Validation module.
The validation module is used by Data/Bean#doValidate. Each bean field is validated by each of the validators specified in the Data.Validation.validators hash.
The bean is also checked for required fields by Data.Validation#requiredValidator.
Members
-
<static> validators :Data/Validation.Validators
-
Type:
Methods
-
<static> requiredValidator(field, fieldName, model, value)
-
Validates if the required field is set on a bean or about to be set.
Parameters:
Name Type Description field
Object Bean field metadata.
fieldName
string Bean field name.
model
Data/Bean Bean instance.
value
string Value to be set.
Returns:
true
if the validation fails,undefined
otherwise.- Type
- boolean