CustomValidator
abstract class CustomValidator
Abstract parent class for our child validation child classes. Each child class must implement the runValidation() function.
Properties
| array | $additionalFieldData | Additional field data. |
|
| string | $field | Name of field being validated. |
|
| bool | $includeDeleted | Include deleted default is false. |
|
| protected string | $_model | Name of the model. |
|
| string | $message | Message when validation fails. |
|
| mixed | $rule | Rule for validation success. |
|
| bool | $success | Flag to mark whether or not validation is successful. |
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.
Signature for the runValidation function that must be implemented by each child class.
Details
at line 68
__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 117
abstract void
runValidation()
Signature for the runValidation function that must be implemented by each child class.