can
Version:
MIT-licensed, client-side, JavaScript framework that makes building rich web applications easy.
16 lines (11 loc) • 578 B
Markdown
Map.validations.static.validateLengthOf validateLengthOf
can.Map.validations 4
`observe.validateLengthOf(attrNames, min, max, options)`
Validates that the specified attributes' lengths are in the given range.
init : function(){
this.validateLengthOf(["suffix"],3,5)
}
{Array<String>|String} attrNames Attribute name(s) to to validate
{Number} min Minimum length (inclusive)
{Number} max Maximum length (inclusive)
{Object} [options] Options for the validations. Valid options include 'message' and 'testIf'.
can.