Besides accepting all options as the non async validation function it also accepts two additional options; clean Attributes which, unless before resolving the promise and wrap Errors which can be a function or constructor that will be called with the errors, options, attributes and constraints if an error occurs.
This allows you to define a better way of catching validation errors.
Unless otherwise specified you can always specify the message option to customize the message returned if the validator doesn't pass.
I find it quite common that you want to have constraints on an optional attribute.
One core value of this library is that nothing should be private or inaccessable.
If you want to modify which values are considered empty for example you can simply overwrite You can find some basic examples included in the project.
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.
You can use the async validate function even if no validations are async, it still returns a promise.