yii\validators\EachValidator::getValidator PHP Method

getValidator() private method

Returns the validator declared in [[rule]].
private getValidator ( Model | null $model = null ) : Validator
$model yii\base\Model | null model in which context validator should be created.
return Validator the declared validator.
    private function getValidator($model = null)
    {
        if ($this->_validator === null) {
            $this->_validator = $this->createEmbeddedValidator($model);
        }
        return $this->_validator;
    }