private function validateAgainstExpression( $field, $value, $rule, $message = null )
    {
        if (preg_match($this->expressions[ $rule ], $value)) {
            return true;
        }

        if (!$message) {
            $message = $this->error_messages[ $rule ];
        }

        static::$errors[ $field ] = $message;

        return false;
    }
private function validateAgainstExpression( $field, $value, $rule, $message = null )
    {
        if (preg_match($this->expressions[ $rule ], $value)) {
            return true;
        }

        if (!$message) {
            $message = $this->error_messages[ $rule ];
        }

        static::$errors[ $field ] = $message;

        return false;
    }
private function validateAgainstExpression ( $ field , $ value , $ rule , $ message = null ) { if ( preg_match ( $ this -> expressions [ $ rule ] , $ value ) ) { return true ; } if ( ! $ message ) { $ message = $ this -> error_messages [ $ rule ] ; } static :: $ errors [ $ field ] = $ message ; return false ; }
Validate a rule against a custom registered expression

@param $field
@param $value
@param $rule
@param null $message
@return bool
Validate a rule against a custom registered expression