-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Pattern Validation via UI Component Fails to Interpret String as RegEx Pattern #9919
Comments
@bap14 thank you for your report. |
@veloraven I installed Magento CE 2.1.7 and added my custom module and confirmed this does occur in the CE release as well. I would prefer to keep this in the public domain in case there are other developers running into this same issue. I can report it in both if necessary. I'll update the initial posting to include the CE edition as well. |
I didn't specify this earlier, but I was working in the admin area, not the frontend. |
Magento CE 2.1.7, Frontend Shippment Address in Checkout, added pattern validation by LayoutProcessorPlugin:
Same problem: is passed as string to pattern validation in rules.js |
@bap14 If this issue is actual for Enterprise Edition only, please address it to Magento Support. |
As specified a few comments back @Stas94 the issue occurs in both CE and EE. |
@bap14, thank you for your report. |
Internal ticket to track issue progress: MAGETWO-82426 |
The issue has been fixed and delivered to 2.2-develop branch. Will be available with 2.2.2 release |
Hi @bap14. Thank you for your report. The fix will be available with the upcoming patch release. |
Hi @bap14. Thank you for your report. The fix will be available with the upcoming 2.1.15 release. |
When using a UI Component based form and adding a custom regular expression pattern validation to an input field, the supplied pattern is not properly converted from a string to a javascript RegEx object.
Preconditions
Steps to reproduce
Create a custom UI Component form
Add a
validation
item to an input fieldSpecify a
pattern
validation rule with a custom regular expression pattern. E.g.Expected result
pattern
value should be interpreted as a RegEx object OR sent throughnew RegEx
within the javascript.Actual result
param.test
is not a function.The text was updated successfully, but these errors were encountered: