Closed emilsgulbis closed 4 months ago
Tried to add required prop when using defineField but state.required always stays false Have tried with yup and Global validators
required
defineField
state.required
false
yup
Global validators
For nuxt/ui if the required props is positive - it auto adds asterisk * after the label
*
const nuxtUiConfig = (state) => { return { props: { error: state.errors[0], required: state.required, // <!-- Not working }, }; };
Vue.js 3.4.13 and vee-validate 4.12.5
No response
https://stackblitz.com/edit/nuxtlabs-ui-vee-validate-v4-affads?file=app.vue
Fixed in c4415f8 and released in v4.12.8
What happened?
Tried to add
required
prop when usingdefineField
butstate.required
always staysfalse
Have tried withyup
andGlobal validators
For nuxt/ui if the
required
props is positive - it auto adds asterisk*
after the labelReproduction steps
required
prop (but it always staysfalse
)Version
Vue.js 3.4.13 and vee-validate 4.12.5
What browsers are you seeing the problem on?
Relevant log output
No response
Demo link
https://stackblitz.com/edit/nuxtlabs-ui-vee-validate-v4-affads?file=app.vue
Code of Conduct