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 fieldObject Bean field metadata.
fieldNamestring Bean field name.
modelData/Bean Bean instance.
valuestring Value to be set.
Returns:
trueif the validation fails,undefinedotherwise.- Type
- boolean