![]() ![]() Useful for debugging, the toString method converts the Checkit error into a human readable representation of the failed validation. The get method returns the Checkit.FieldError object for a specific key, or undefined if one does not exist.toString() The keys in this hash are the invalid fields, and the values are Checkit.FieldError objects, which in-turn have an errors attribute, an array containing errors for each failed rule.get(key) ![]() The "errors" property of a Checkit.Error object is a hash of errors for each of the fields which are considered "invalid" in any way by the validation rules. The main Error object, Checkit.Error is returned from the has several helper methods & properties, as well as a number of utility methods. One of the main features of Checkit is the error handling By extending the error object with utility methods from underscore, the errors are even easier to work with. checkSync ( 'email', email, ) if ( err ) Checkit Errors
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |