public function check($value)
    {
        if ($this->hasError($value)) {
            $this->error = sprintf($this->errorTpl, (string) $value);

            return false;
        }

        return true;
    }
public function check($value)
    {
        if ($this->hasError($value)) {
            $this->error = sprintf($this->errorTpl, (string) $value);

            return false;
        }

        return true;
    }
public function check ( $ value ) { if ( $ this -> hasError ( $ value ) ) { $ this -> error = sprintf ( $ this -> errorTpl , ( string ) $ value ) ; return false ; } return true ; }
Checks a value and sets error message
@param  mixed   $value Value to check
@return boolean True if value is valid and False otherwise
Checks a value and sets error message