Skip to content

Commit 64943b3

Browse files
ikushumKaelWD
andauthored
fix(VMaskInput): use proper validation value (#21719)
Co-authored-by: Kael <[email protected]>
1 parent d4efd48 commit 64943b3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/vuetify/src/labs/VMaskInput/VMaskInput.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { makeMaskProps, useMask } from '@/composables/mask'
77
import { useProxiedModel } from '@/composables/proxiedModel'
88

99
// Utilities
10-
import { computed, onBeforeMount, ref } from 'vue'
10+
import { computed, onBeforeMount, ref, toRef } from 'vue'
1111
import { genericComponent, propsFactory, useRender } from '@/util'
1212

1313
// Types
@@ -60,6 +60,8 @@ export const VMaskInput = genericComponent<VMaskInputSlots>()({
6060
},
6161
)
6262

63+
const validationValue = toRef(() => returnMaskedValue.value ? maskText(model.value) : unmaskText(model.value))
64+
6365
onBeforeMount(() => {
6466
if (props.returnMaskedValue) {
6567
emit('update:modelValue', model.value)
@@ -74,6 +76,7 @@ export const VMaskInput = genericComponent<VMaskInputSlots>()({
7476
{ ...textFieldProps }
7577
v-model={ model.value }
7678
ref={ vTextFieldRef }
79+
validationValue={ validationValue.value }
7780
>
7881
{{ ...slots }}
7982
</VTextField>

0 commit comments

Comments
 (0)