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
Hi everyone, I'm writing a custom checkbox that returns true/false or 1/0 depending on a property called responseFormat. When I use useField of vee-validate and set checkedValue and uncheckedValue the vModel modifies its value, but when uncheckedValue is zero the validation doesn't work, it's always true.
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
-
Hi everyone, I'm writing a custom checkbox that returns true/false or 1/0 depending on a property called responseFormat. When I use useField of vee-validate and set checkedValue and uncheckedValue the vModel modifies its value, but when uncheckedValue is zero the validation doesn't work, it's always true.
Component Code:
https://github.com/ftorrens/errorMSW/blob/53c6c947cefa55003fe345ed5792b404053f3ccd/src/components/switch.vue
Call code:
https://github.com/ftorrens/errorMSW/blob/53c6c947cefa55003fe345ed5792b404053f3ccd/src/views/Index.vue
Full demo:
https://github.com/ftorrens/errorMSW/tree/main
run:
1- npm i
2- npm run dev
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions