code: public function validate()
  	{
  		$varValue = $this->validator($this->getPost($this->strName));
  
  		if ($this->hasErrors())
  		{
  			$this->class = 'error';
  		}
  
  		$this->varValue = $varValue;
  	}
docs: Validate the user input and set the value