From 61aeb06e0ab4babd816716d4d72ae4a9ca8e4069 Mon Sep 17 00:00:00 2001 From: Sneha Date: Wed, 15 Nov 2023 16:02:21 +0530 Subject: [PATCH] validate alphanumeric values --- .../promo-modal-question/promo-question/promo-question.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/layouts/payment-method/promo-modal-question/promo-question/promo-question.vue b/src/layouts/payment-method/promo-modal-question/promo-question/promo-question.vue index 25744e652..7b4fd9049 100644 --- a/src/layouts/payment-method/promo-modal-question/promo-question/promo-question.vue +++ b/src/layouts/payment-method/promo-modal-question/promo-question/promo-question.vue @@ -8,6 +8,7 @@ cornerStyle="rounded" :displayQuestionText="false" isRequired + @input="validateAlphanumeric" validationRules="promo-required" /> @@ -38,6 +39,11 @@ export default { }, }, }, + methods: { + validateAlphanumeric() { + this.value = this.value.replace(/[^a-zA-Z0-9]/g, ""); + }, + }, components: { textboxQuestion, },