yii\base\Model::getValidators PHP Method

getValidators() public method

This method differs from Model::getActiveValidators in that the latter only returns the validators applicable to the current [[scenario]]. Because this method returns an ArrayObject object, you may manipulate it by inserting or removing validators (useful in model behaviors). For example, php $model->validators[] = $newValidator;
public getValidators ( ) : ArrayObjec\ArrayObject | Validator[]
return ArrayObjec\ArrayObject | yii\validators\Validator[] all the validators declared in the model.
    public function getValidators()
    {
        if ($this->_validators === null) {
            $this->_validators = $this->createValidators();
        }
        return $this->_validators;
    }