RequiredValidator
class RequiredValidator extends CustomValidator
Child class that performs validation for fields that are required.
Properties
| $additionalFieldData | from CustomValidator | ||
| $field | from CustomValidator | ||
| $includeDeleted | from CustomValidator | ||
| $message | from CustomValidator | ||
| $rule | from CustomValidator | ||
| $success | from CustomValidator |
Methods
Constructor for Custom Validator. It performs checks on the model and params such as fields, rules, and messages. Finally the validation is performed against input from a form. An exception is thrown if any conditions are not satisfied. When an exception is thrown a message is displayed describing the issue.
Implements the abstract function of the same name from the parent class. Enforces the required requirement for a field.
Details
in
CustomValidator at line 33
__construct(object $model, array $params)
Constructor for Custom Validator. It performs checks on the model and params such as fields, rules, and messages. Finally the validation is performed against input from a form. An exception is thrown if any conditions are not satisfied. When an exception is thrown a message is displayed describing the issue.
at line 16
void
runValidation()
Implements the abstract function of the same name from the parent class. Enforces the required requirement for a field.