Check if the input value passes a callback method
Using with form field
* presents a required option. The HTML attributes are used to set the validator options via the Declarative plugin
| || ||Function||The callback method|
| || ||String||The error message|
The callback method must follow the format below:
If you want to return a dynamic message, the callback function must return an object containing the
TipLook at the Alias plugin if you want to have multiple callbacks on the same field
Using with ES6 module
In the following form, user is asked to enter a correct answer of simple operation which is generated randomly.
ES6 Module Example
The following snippet shows how to use the callback validator with ES6 module to check if a password is strong or weak:
The following validators might be useful to you.