class MinValidator extends CustomValidator

Child class that performs validation for the minimum length of a value for a field.

Properties

array $additionalFieldData

Additional field data.

from  CustomValidator
string $field

Name of field being validated.

from  CustomValidator
bool $includeDeleted

Include deleted default is false.

from  CustomValidator
protected string $_model

Name of the model.

from  CustomValidator
string $message

Message when validation fails.

from  CustomValidator
mixed $rule

Rule for validation success.

from  CustomValidator
bool $success

Flag to mark whether or not validation is successful.

from  CustomValidator

Methods

__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.

void
runValidation()

Signature for the runValidation function that must be implemented by each child class.

Details

in CustomValidator 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.

Parameters

object $model

The name of the model we want to perform validation when submitting a form.

array $params

A list of values obtained from an input when a form is submitted during a post action.

at line 16
void runValidation()

Signature for the runValidation function that must be implemented by each child class.

Return Value

void