validate() public method

Performs the server side validation.
public validate ( ) : void
return void
コード例 #1
0
ファイル: SelectBox.php プロジェクト: jurasm2/nette
 /**
  * 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]);
     }
 }
コード例 #2
0
ファイル: TextBase.php プロジェクト: nette/forms
 /**
  * Performs the server side validation.
  * @return void
  */
 public function validate()
 {
     if ($this->value === Strings::trim($this->translate($this->emptyValue))) {
         $this->value = '';
     }
     parent::validate();
 }