Skip to content

fix invalid regex modifier for key validator - #3

Open
daniil-berg wants to merge 1 commit into
frumbert:mainfrom
daniil-berg:fix-regex
Open

fix invalid regex modifier for key validator#3
daniil-berg wants to merge 1 commit into
frumbert:mainfrom
daniil-berg:fix-regex

Conversation

@daniil-berg

Copy link
Copy Markdown

The g modifier is not valid for preg_grep (or preg_match).

The default for $VALIDATOR set in the constructor is now '/./'. The empty check in the validate_key method is no longer needed.

Using preg_match is simpler and more readable.

The `g` modifier is not valid for `preg_grep` (or `preg_match`).
The default for `$VALIDATOR` set in the constructor is now `'/./'`.
The `empty` check in the `validate_key` method is no longer needed.
Using `preg_match` is simpler and more readable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant