can
Version:
MIT-licensed, client-side, JavaScript framework that makes building rich web applications easy.
15 lines (11 loc) • 582 B
Markdown
Map.validations.static.validateRangeOf validateRangeOf
can.Map.validations 6
`observe.validateRangeOf(attrNames, low, hi, options)`
Validates that the specified attributes are in the given numeric range.
init : function(){
this.validateRangeOf(["age"],21, 130);
}
{Array<String>|String} attrNames Attribute name(s) to to validate
{Number} low Minimum value (inclusive)
{Number} hi Maximum value (inclusive)
{Object} [options] (optional) Options for the validations. Valid options include 'message' and 'testIf'.
can.