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 project can be found on Git Hub where you can also find our issue tracker.
If the message is not a function and not a string it is simply returned as is.
This differs from example Ruby on Rails where validators instead have the option.
I find it quite common that you want to have constraints on an optional attribute.
If an is thrown from an async validator the argument passed to the rejection handler will be that error.
This allows you to differentiate from coding errors and validation errors.