You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to do dynamic filed validation, I have checked on previous discussion, the nearest I can get is this 3418, but failed to get it running.
The error keep on prompting, "TypeError: yup.required is not a function" in browser console.
Currently, I am running on
"vee-validate": "^4.7.0",
"vue": "^3.2.40",
"yup": "^0.32.11"
<Form @submit="handleSubmit" :validation-schema="schema">
<div class="column" v-for="(item, idx1) in items" :key="idx1">
<Field
v-slot="{ field, errors, meta }"
v-model="apacDtls[item.map]"
:name="item.map"
>
<o-field :label="item.label">
<o-input
v-model="apacDtls[item.map]"
v-bind="field"
/>
</o-field>
...
<script setup>
watchEffect(() => {
schema.value = yup.object().shape({batch_details_id: yup.required("Is required")}); <---"TypeError: yup.required is not a function"
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I would like to do dynamic filed validation, I have checked on previous discussion, the nearest I can get is this 3418, but failed to get it running.
The error keep on prompting, "TypeError: yup.required is not a function" in browser console.
Currently, I am running on
"vee-validate": "^4.7.0",
"vue": "^3.2.40",
"yup": "^0.32.11"
Beta Was this translation helpful? Give feedback.
All reactions