What does validating a website mean
is an open source component of Wrapp and is licensed under the MIT license.
There are no required external dependencies at all!
Any A type promise can be used, just override function success(attributes) function error(errors) var constraints = ; var attributes = ; // Will call the success function and log validate.async(attributes, constraints).then(success, error); // Will call the error function validate.async(, constraints).then(success, error); function Validation Errors(errors, options, attributes, constraints) Validation Errors.prototype = new Error(); // This isn't supported by the ES6 promises validate.async(, constraints, ) .then(success) .catch(Validation Errors, function(error) ) .catch(function(error) ); // Supporting another promise implementation (RSVP in this case) validate. Promise; Sometimes you only want to validate a single value against some constraints and using the normal validate function is quite verbose so there is a shorthand for this.
It does little more than proxying the call do the main validation function but with the value wrapped in an object and the options full Messages and format set to also has limited support for nested objects (objects within objects) using the dot notation.
They are meant to give a feeling for how to use the library and should not be considered production ready code.
If you want to use async validation you need to use a runtime that supports Promises.
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.
You can use the async validate function even if no validations are async, it still returns a promise.
You can not, however, use the regular function with async validations.