-
-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validators::is() doesnt work well with pattern containing pipe character (because of string exploding) #15
Comments
Hello, yes that's true I have same problem, I already prepare code and created a bit new syntax for that. |
Majkl578
added a commit
to Majkl578/nette-utils
that referenced
this issue
Sep 23, 2014
Have a look at #31 as a possible fix. |
Should I send pull request? |
I did, see #31. |
This is too hard to fix. |
milo
pushed a commit
to milo/nette-utils
that referenced
this issue
Feb 25, 2021
…callback in code [closes nette#15]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i added a PR #14 that covers the pattern e.g.: 'pattern:(John|Carl) Doe'
because of the "foreach (explode('|', $expected) as $item)..." in the is() validator, the validator explodes the string trying to make alternatives of possibilities, but the pipe in the $expected string represents regex alternative. don't know how to solve it generally, so i made just the update to test.
The text was updated successfully, but these errors were encountered: