protected function validate() { parent::validate(); $this->_name = $this->name->orEmpty(); if (Users::checkEmailConstraint($this->_email)) { throw new ValidatorException("User with this email already registered"); } }