validators\EachValidator validateValue()

validateValue() protected method Validates a value. A validator class can implement this method to support data validation out of the context of a data model. protected array|null validateValue ( $value )$value mixed The data value to be validated. return array|null The error message and the parameters to be inserted into the error message. Null should be returned if the data is valid. throws yii\base\NotSupportedException if the validator does not supporting data validation withou

validators\EachValidator $rule

$rule public property Definition of the validation rule, which should be used on array values. It should be specified in the same format as at \yii\validators\yii\base\Model::rules(), except it should not contain attribute list as the first element. For example: ['integer'] ['match', 'pattern' => '/[a-z]/is'] Please refer to \yii\validators\yii\base\Model::rules() for more details. public array|yii\validators\Validator $rule = null

validators\EachValidator validateAttribute()

validateAttribute() public method Validates a single attribute. Child classes must implement this method to provide the actual validation logic. public void validateAttribute ( $model, $attribute )$model yii\base\Model The data model to be validated $attribute string The name of the attribute to be validated.

validators\EachValidator init()

init() public method Initializes the object. This method is invoked at the end of the constructor after the object is initialized with the given configuration. public void init ( )

validators\DefaultValueValidator validateAttribute()

validateAttribute() public method Validates a single attribute. Child classes must implement this method to provide the actual validation logic. public void validateAttribute ( $model, $attribute )$model yii\base\Model The data model to be validated $attribute string The name of the attribute to be validated.

validators\DefaultValueValidator $value

$value public property The default value or an anonymous function that returns the default value which will be assigned to the attributes being validated if they are empty. The signature of the anonymous function should be as follows, function($model, $attribute) { // compute value return $value; } public mixed $value = null

validators\EachValidator $allowMessageFromRule

$allowMessageFromRule public property Whether to use error message composed by validator declared via $rule if its validation fails. If enabled, error message specified for this validator itself will appear only if attribute value is not an array. If disabled, own error message value will be used always. public boolean $allowMessageFromRule = true

validators\DateValidator parseDateValue()

parseDateValue() protected method Parses date string into UNIX timestamp protected integer|false parseDateValue ( $value )$value string String representing date return integer|false A UNIX timestamp or false on failure.

validators\DefaultValueValidator $skipOnEmpty

$skipOnEmpty public property This property is overwritten to be false so that this validator will be applied when the value being validated is empty. public boolean $skipOnEmpty = false

validators\DateValidator validateValue()

validateValue() protected method Validates a value. A validator class can implement this method to support data validation out of the context of a data model. protected array|null validateValue ( $value )$value mixed The data value to be validated. return array|null The error message and the parameters to be inserted into the error message. Null should be returned if the data is valid. throws yii\base\NotSupportedException if the validator does not supporting data validation withou