-
Notifications
You must be signed in to change notification settings - Fork 26.2k
feat(forms): handle string with and without line boundary on pattern validator #19256
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I see that you just added the
If you want your PR to be merged, it has to pass all the checks. But if you have a good reason to want to merge this, please contact the caretaker to let them know. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Validator pattern only works with string without line boundaries (
^
&$
), the validator will then add them itself to the string automatically. But today wasn't the first time I helped someone because those boundaries characters were already present on the string and so the validator was failing.Issue Number: N/A
What is the new behavior?
I think we can be a bit smarter here and only add those boundaries characters if they're missing.
It's easy enough and has no impact.
Does this PR introduce a breaking change?
Other information