awa.mvc.ModelRules.format Class
Extends awa.mvc.ModelRule
Defined in:
Module: awa.mvc.ModelRules
/var/www/azaleahealth.com/branches/docs/source_repo/awa/resources/apps/js/awa/mvc/ModelRules.js:450
static rule for regex pattern checking
Item Index
Methods
Methods
method
(
Boolean
-
value -
[attr] -
[params]
returns true if the value parameter is a string and matches any of the regex strings found in params.patterns. false otherwise
pat_emergency_contact_phone: {
errorMessage: 'Enter a valid Phone #'
patterns: [
/^\d{10}(.{1,10})?$/
]
}
Parameters:
-
valueObjectValue to check
-
[attr]String optionalAttribute key
-
[params]Object optionalassortment of parameters
-
[patterns]Array optionalarray of regex strings
-
Returns:
Boolean:
If the function passes