Skip to content

Commit

Permalink
add resetValidation on Vinput
Browse files Browse the repository at this point in the history
  • Loading branch information
VachetVirginie committed Dec 6, 2024
1 parent e1664bb commit 3c983e5
Showing 1 changed file with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions packages/synapse-bridge/src/patterns/NirField/NirField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,13 @@ export default defineComponent({
return this.isSingleField
? [numberRules]
: [
numberRules,
() => {
this.validateKeyValue(this.maskaKeyValue.unmasked)
numberRules,
() => {
this.validateKeyValue(this.maskaKeyValue.unmasked)
return this.keyErrors.length === 0
},
]
return this.keyErrors.length === 0
},
]
},
errors(): string[] | never[] {
Expand Down Expand Up @@ -271,12 +271,12 @@ export default defineComponent({
},
focusKeyField({
key,
altKey,
ctrlKey,
metaKey,
shiftKey,
}: KeyboardEvent): void {
key,
altKey,
ctrlKey,
metaKey,
shiftKey,
}: KeyboardEvent): void {
const isSingleField = this.isSingleField
const notFilled = !this.maskaNumberValue.completed
const keyHasModifier = altKey || ctrlKey || metaKey || shiftKey
Expand Down Expand Up @@ -354,7 +354,14 @@ export default defineComponent({
numberErrors = []
}
"
/>
>
<template #append-inner>
<slot
v-if="maskaNumberValue.completed"
name="number-append-icon"
/>
</template>
</VTextField>
<div id="number-field-errors" class="d-sr-only">
{{ numberErrors.join(' ') }}
</div>
Expand Down Expand Up @@ -385,7 +392,14 @@ export default defineComponent({
keyErrors = []
}
"
/>
>
<template #append-inner>
<slot
v-if="maskaKeyValue.completed"
name="key-append-icon"
/>
</template>
</VTextField>
<div id="key-field-errors" class="d-sr-only">
{{ keyErrors.join(' ') }}
</div>
Expand Down

0 comments on commit 3c983e5

Please sign in to comment.