-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
Inconsistent Form::PATTERN #104
Comments
Probably you can change (...) to (?:...) as fix. |
I don't think so. There are missing brackets. Pattern is bracketed only in javascript validator. PR #105 |
To use (?:....) is not possible? |
if you think |
In this case documentation is wrong http://php.net/manual/en/regexp.reference.subpatterns.php |
Sorry I don't understand what you mean. Just here put
Because |
Oh, I see. I had understood that I use ?: in pattern (eg. in ->addRule). I did not note (only one pair of breckets), my fault, sorry. O:-) yeah, now it works correctly. |
👍 btw commit message should be changed, isn't it? |
|
Thanks! |
When I use back references in pattern rule (Form::PATTERN), it creates different behaviour on client side and server side in validation, because in Validator class, input pattern is bracked.
Example pattern:
(.)\1{2,}
Different back reference:
\1
\2
Before I create PR, I would like to know, why pattern is bracked. There are two options: remove these bracket, or add to brackes (here
, here).reference bug reporting in czech forum: https://forum.nette.org/cs/25332-invert-regularniho-vyrazu#p168360
The text was updated successfully, but these errors were encountered: