Overtrue\Validation\Validator::validateRegex PHP 메소드

validateRegex() 보호된 메소드

Validate that an attribute passes a regular expression check.
protected validateRegex ( string $attribute, mixed $value, array $parameters ) : boolean
$attribute string
$value mixed
$parameters array
리턴 boolean
    protected function validateRegex($attribute, $value, $parameters)
    {
        $this->requireParameterCount(1, $parameters, 'regex');
        return preg_match($parameters[0], $value);
    }
Validator