Esempio n. 1
0
 /**
  * Performs the server side validation.
  * @return void
  */
 public function validate()
 {
     parent::validate();
     if (!$this->isDisabled() && $this->prompt === FALSE && $this->getValue() === NULL && $this->options) {
         $this->addError(Nette\Forms\Validator::$messages[self::VALID]);
     }
 }
Esempio n. 2
0
 /**
  * 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\Rules::$defaultMessages[self::VALID]);
     }
 }