identical validator

Check if the value is the same as one of given value


Using with form field

* presents a required option. The HTML attributes are used to set the validator options via the Declarative plugin

Name HTML attribute Type Description
compare* data-fv-identical___compare String or a function returns a string The value that the field has to be different with
message data-fv-identical___message String The error message

Using with ES6 module

Basic Example

The following form requires the password and confirmation one to be the same using identical validator.

More examples

Related validators

The following validators might be useful to you.