From 50f4051c1a38dd1eba1e2a210e68e6771534ba82 Mon Sep 17 00:00:00 2001 From: Prince Patel Date: Sat, 28 Jul 2018 01:20:39 +0530 Subject: [PATCH] Update rules.js --- app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 8104d4883dce6..00de03ba69647 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 @@ -316,7 +316,7 @@ define([ ], "pattern": [ function(value, param) { - return param.test(value); + return new RegExp(param).test(value); }, $.mage.__('Invalid format.') ],