validateInclusionOf
can.Map.validations.static.validateInclusionOf
observe.validateInclusionOf(attrNames, inArray, options)
Validates whether the values of the specified attributes are available in a particular array.
init : function(){
this.validateInclusionOf(["salutation"],["Mr.","Mrs.","Dr."])
}
Parameters
-
attrNames
{Array<String>}
Attribute name(s) to to validate
-
inArray
{Array}
Array of options to test for inclusion
-
options
{Object}
OptionalOptions for the validations. Valid options include 'message' and 'testIf'.