/** * Performs the server side validation. * @return void */ public function validate() { parent::validate(); if (!$this->isDisabled() && $this->prompt === FALSE && $this->getValue() === NULL) { $this->addError(Nette\Forms\Validator::$messages[self::VALID]); } }
/** * Performs the server side validation. * @return void */ public function validate() { if ($this->value === Strings::trim($this->translate($this->emptyValue))) { $this->value = ''; } parent::validate(); }