public function setValue($newValue) { if (empty($newValue)) { throw new \InvalidArgumentException('Login can`t be empty'); } parent::setValue($newValue); }