Getting the raw (unmasked) value from Maska? #113
Answered
by
beholdr
brandonleichty
asked this question in
Q&A
-
I have one last question for the evening 🙂 Let's say I have a form input that takes a credit card like this:
If I were to enter "1234 1234 1234 1234", Maska returns that exact string with the spaces. Is there a good (or easy) way to get the raw value without the added spaces from Maska? 🙏 |
Beta Was this translation helpful? Give feedback.
Answered by
beholdr
Dec 20, 2022
Replies: 1 comment 2 replies
-
You could bind mask result to reactive variable which will contain masked and unmasked value. <script setup>
import { reactive } from "vue"
import { vMaska } from "maska"
const binded = reactive({})
</script>
<template>
<input v-maska="binded">
<p v-if="binded.completed">
Masked value: {{ binded.masked }}
Unmasked value: {{ binded.unmasked }}
</p>
</template> |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
brandonleichty
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could bind mask result to reactive variable which will contain masked and unmasked value.
Example from docs: