You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @Averor !
I spent a couple of hours thinking about this problem. I agree with your suggestion to improve regex with [^)]+. It definitely solves the problem of multiple sub-validators.
As you correctly mentioned in the end, another test failed because it uses parenthesis within the regular expression: :string :regex(/so(me|ar)/,(((12)). The only "quick" fix I came up with was to add possibility to escape "closing parenthesis" like this: \). So the mentioned example became: :string :regex(/so(me|ar\)/,(((12\))
Now tests look green and probably I will merge this solution to master next week. However, the abovementioned solution is not "the best out there" and I hope to find a better one.
Let me know if you have other ideas of solving this issue.
But, in below example
two validators are created, string and min, the last having argument of
that means erroneous behavior.
Looking into
method, and regexp used to match validator, mistake can be seen - no matching for closing parenthesis.
A little fix can be changing
to
Still, however, closing parenthesis used as part of argument (ex. for regexp validator) will cause some problems...
The text was updated successfully, but these errors were encountered: