src/Validators/StringValidators/PatternValidator.php
public function validate($subject): bool
    {
        if (\is_string($this->schema['pattern'])) {
            if (!\preg_match(sprintf('/%s/i', $this->schema['pattern']), $subject)) {
                return false;
            }
        }
        return true;
    }
public function validate($subject): bool
    {
        if (\is_string($this->schema['pattern'])) {
            if (!\preg_match(sprintf('/%s/i', $this->schema['pattern']), $subject)) {
                return false;
            }
        }
        return true;
    }
public function validate ( $ subject ) : bool { if ( \ is_string ( $ this -> schema [ 'pattern' ] ) ) { if ( ! \ preg_match ( sprintf ( '/%s/i' , $ this -> schema [ 'pattern' ] ) , $ subject ) ) { return false ; } } return true ; }
Validates subject against pattern

@param $subject
@return bool
Validates subject against pattern