Return true if the input value is different with given field's value
* — Required option
|Option ||HTML attribute ||Type ||Description |
|String ||The name of field that will be used to compare with current one. |
You also can indicate many fields which names are separated by a comma.
|String ||The error message |
When setting options via HTML attributes, remember to enable the validator by setting data-fv-different="true".
From v0.6.0, you don't need to set different validator for all fields which you want them to be different to each other. For example, instead of using different validator for all fields as following
just set it to one of fields:
The plugin then will update the message, icon, status of fields properly when you change value any fields.
The registration form below doesn't allow the username and password to be the same:
The following validators might be useful to you: