public function validate($value)
    {
        if (!$this->test($value)) {
            // TODO: Use exception after 4.0
            $this->setError($this->formatMessage($this->getMessage(), $value));

            return false;
        }

        return true;
    }
public function validate($value)
    {
        if (!$this->test($value)) {
            // TODO: Use exception after 4.0
            $this->setError($this->formatMessage($this->getMessage(), $value));

            return false;
        }

        return true;
    }
public function validate ( $ value ) { if ( ! $ this -> test ( $ value ) ) { // TODO: Use exception after 4.0 $ this -> setError ( $ this -> formatMessage ( $ this -> getMessage ( ) , $ value ) ) ; return false ; } return true ; }
Validate this value and set error message..

@param mixed $value

@return  boolean
Validate this value and set error message ..