From 92f569f6617ed7440bcb0aa8446d46977c44e58a Mon Sep 17 00:00:00 2001 From: dlohvinov Date: Mon, 22 Jul 2024 18:50:10 +0300 Subject: [PATCH] fix: password regex input default message [WTEL-4784, WTEL-4785, WTEL-4786] --- src/app/components/utils/user-password-input.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/components/utils/user-password-input.vue b/src/app/components/utils/user-password-input.vue index 05d083e11..c941c5514 100644 --- a/src/app/components/utils/user-password-input.vue +++ b/src/app/components/utils/user-password-input.vue @@ -37,7 +37,8 @@ const isNew = computed(() => { const v$ = useVuelidate( computed(() => { - const vRegexRule = (v) => (vRegex.value ? vRegex.value.test(v) : false); + const regexpInstance = new RegExp(vRegex.value); + const vRegexRule = (v) => (vRegex.value ? regexpInstance.test(v) : false); const regex = helpers.withParams( { regex: vRegex.value }, @@ -78,7 +79,7 @@ const loadV = async () => { ({ name }) => name === EngineSystemSettingName.PasswordValidationText, )?.value; - vRegex.value = new RegExp(regex); + vRegex.value = regex; vErrorText.value = errorText; };