The attributes must be a plain object or a form element, things like backbone models etc are not supported.For the format of the constraints see the constraints section.
The goal of is to provide a cross framework and cross language way of validating data.
If the attributes objects is an HTML/DOM/j Query element Even though none of the built in validators are async it is sometimes useful to have async validations.
One example would be to check if a username is already used by asking the server.
Sometimes it's nice to be able validate field differently depending on the input itself.
allows the validators object and validator options to be a function that should return the constraints/options: Validates the attributes object against the constraints.