How can I get the Field meta in the Form? #3814
Answered
by
logaretm
Vivi-Ornitier
asked this question in
Q&A
-
I need both Form meta and Field meta.
Can anyone help me? |
Beta Was this translation helpful? Give feedback.
Answered by
logaretm
Jun 29, 2022
Replies: 1 comment 5 replies
-
You can rename destructed slot props <Form v-slot="{ errors, meta: formMeta }">
<Field
v-slot="{ meta: fieldMeta }"
type="text"
maxlength="1"
required
rules="required|max:1"
:class="{
'text-error': meta.valid
}"
/>
<div v-if="formMeta.touched && ! formMeta.valid">
Form has errors.
</div>
</Form> |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
Vivi-Ornitier
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can rename destructed slot props