Nette\Forms\Controls\TextBase::validate PHP Method

validate() public method

Performs the server side validation.
public validate ( ) : void
return void
    public function validate()
    {
        if ($this->value === Strings::trim($this->translate($this->emptyValue))) {
            $this->value = '';
        }
        parent::validate();
    }

Usage Example

コード例 #1
0
ファイル: TextCaptcha.php プロジェクト: jirinapravnik/common
 public function validate()
 {
     parent::validate();
     if ($this->rules->validate() === TRUE) {
         $this->session->getSection($this->sessionSection)->remove();
     }
 }