diff --git a/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js b/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js index 76b00f56e780c..01a1575541408 100644 --- a/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js +++ b/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js @@ -360,7 +360,7 @@ define([ ], 'pattern': [ function (value, param) { - return param.test(value); + return new RegExp(param).test(value); }, $.mage.__('Invalid format.') ],