Comments (1)
Update from my side: I found two ways to get around this issue.
Nr 1. Do not use the v-model shorthand
use the long version of v-model with the correct prop and event name from the (vue3) child component
<Field
:model-value="url"
@update:model-value="(newValue) => (url = newValue)"
// instead of v-model="url"
>
Nr 2. Set MODE: 3 for vee-validate to fix v-model shorthand
- I kind of missunderstood how the compat mode works
- The compat configs need to be set on the child components, not (only) the parents.
- The global compatConfig
MODE: 3
incompilerOptions
invue.config.js
seems not to apply automatically to all components. Or am I missing here something, too? And this maybe only is true for third party packages?
So to set MODE: 3 for vee validate components this kind of works in this case:
import { Field, Form as ValidationForm } from 'vee-validate'
Field.compatConfig = { MODE: 3 };
ValidationForm.compatConfig = { MODE: 3 };
I think in this cases this works but I can imagine if the 3rd party library component has again child components itself the issue gets bigger since we cannot go down there and set the MODE: 3 recursively for all childs. Or can we?
Both solutions do not feel too good and a bit hacky.
Any other solution would be very welcome.
from vee-validate.
Related Issues (20)
- `configure()` doesnt work to turn off validateOnChange, validateOnInput, validateOnModelUpdate HOT 1
- How to Dynamic Field
- How can I usefieldarray to dynamically reflect validation?
- How can I `useFieldArray` to dynamically reflect validation?
- The types for the errors when using useFieldArray are incorrect
- Issue with Validation in Checkbox Group Implementation
- useFieldArray's remove method is triggered twice when removing many fields consecutively
- Custom component does not trigger change event on form HOT 1
- Ability to customize interpolation prefix/suffix HOT 1
- Force resetting a form should also force reset initial values instead of merging
- Components. Yup. It is not possible to set the default value via .default(). I can't delete fields using .strip() HOT 3
- Unable to display a label when using vscode-dropdown with vee-validate Field
- I am using vee-validation but my initial values not geeting update HOT 1
- There is no way to tell vee-validate our class instance is whole and no need for PartialDeepObject HOT 3
- useField object structure HOT 1
- vee-validate V4 - how to create a custom error message in a function and get it displayed?
- <title>Vee-validate V4 - lazy validation not working - rule is being called on each keystroke HOT 5
- `meta.required` not detected when validation schema is passed after `useForm()` is called HOT 1
- All checkboxes of a checkbox group mandatory HOT 8
- d HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vee-validate.