Skip to content

Commit 461888c

Browse files
ENGCOM-2584: [Backport 2.1] Fix 'pattern' UI Component validation #17213
- Merge Pull Request #17213 from mageprince/magento2:mageprince-2.1-patch-pull-11565 - Merged commits: 1. 64bad6b 2. 50f4051
2 parents f06f52c + 50f4051 commit 461888c

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/Ui/view/base/web/js/lib/validation

1 file changed

+1
-1
lines changed

app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ define([
316316
],
317317
"pattern": [
318318
function(value, param) {
319-
return param.test(value);
319+
return new RegExp(param).test(value);
320320
},
321321
$.mage.__('Invalid format.')
322322
],

0 commit comments

Comments
 (0)