yii\validators\Validator::init PHP Метод

init() публичный Метод

public init ( )
    public function init()
    {
        parent::init();
        $this->attributes = (array) $this->attributes;
        $this->on = (array) $this->on;
        $this->except = (array) $this->except;
    }

Usage Example

 public function init()
 {
     parent::init();
     if ($this->message === null) {
         $this->message = Yii::t('yii', '{attribute} is not a valid mac-address.');
     }
 }
All Usage Examples Of yii\validators\Validator::init