validateRangeOf
can.Map.validations.static.validateRangeOf
observe.validateRangeOf(attrNames, low, hi, options)
Validates that the specified attributes are in the given numeric range.
init : function(){
this.validateRangeOf(["age"],21, 130);
}
Parameters
-
attrNames
{Array<String>}
Attribute name(s) to to validate
-
low
{Number}
Minimum value (inclusive)
-
hi
{Number}
Maximum value (inclusive)
-
options
{Object}
OptionalOptions for the validations. Valid options include 'message' and 'testIf'.