Skip to content

Commit e96558c

Browse files
authored
ENGCOM-5557: #23766 - fix pattern validation on form submit #23767
2 parents 88cbf53 + 736e8e3 commit e96558c

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)