Skip to content

Commit 8488c07

Browse files
committed
#23766 - fix pattern validation on form submit
1 parent 2e7f039 commit 8488c07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/web/mage/validation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@
559559
/* eslint-enable max-len */
560560
'pattern': [
561561
function (value, element, param) {
562-
return this.optional(element) || param.test(value);
562+
return this.optional(element) || new RegExp(param).test(value);
563563
},
564564
$.mage.__('Invalid format.')
565565
],

0 commit comments

Comments
 (0)