validate alphanumeric values

This commit is contained in:
Sneha 2023-11-15 16:02:21 +05:30
parent 67b905dc4c
commit 61aeb06e0a

View file

@ -8,6 +8,7 @@
cornerStyle="rounded" cornerStyle="rounded"
:displayQuestionText="false" :displayQuestionText="false"
isRequired isRequired
@input="validateAlphanumeric"
validationRules="promo-required" /> validationRules="promo-required" />
</template> </template>
@ -38,6 +39,11 @@ export default {
}, },
}, },
}, },
methods: {
validateAlphanumeric() {
this.value = this.value.replace(/[^a-zA-Z0-9]/g, "");
},
},
components: { components: {
textboxQuestion, textboxQuestion,
}, },