Back
errorCount()
Returns the number of errors this object has associated with it. Specify property or name if you wish to count only specific errors.
// Check how many errors are set on the object
if(author.errorCount() GTE 10){
// Do something to deal with this very erroneous author here...
}
// Check how many errors are associated with the `email` property
if(author.errorCount("email") gt 0){
// Do something to deal with this erroneous author here...
}
Copied!