Comments (5)
This was reported a lot of times and is intended.
Validation being lazy means the errors are generated lazily, but the validation still occurs. This is because the meta.valid
flag must be correct, there is no way around it in terms of whate vee-validate can do. Either we make the valid
flag incorrect till a validation is executed or we run rules implicitly like we do now.
This behavior existed in v2, v3 where the valid
flag could've a value of null
to indicate that it never ran any validations yet, but people confused it with false
and rightfully so, it is a falsy value. And it caused a lot of issues to be reported. So it's either I satisfy this camp or that camp. No in between.
This means there is no solution for it, but there might be workarounds you can employ:
- Caching the input value within the validator so if the user types it again for the same input, it won't execute the expensive request.
- Empty values usually are falsy for this kind of validation, right? you can skip running it all together if the value is empty within the validator logic.
- You can debounce the network requests ensure only one validation is run every 300 ms or so, you can further chain the validation results promises to return the value of the last validation run. Many techniques exist for async debouncing.
Unfortunately its all user-land, any changes here means a breaking change and that's reserved for v5.
from vee-validate.
from vee-validate.
from vee-validate.
from vee-validate.
from vee-validate.
Related Issues (20)
- 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 2
- 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?
- `meta.required` not detected when validation schema is passed after `useForm()` is called HOT 1
- All checkboxes of a checkbox group mandatory HOT 7
- d HOT 1
- useFieldParam
- [docs]: Codepen on the Validation page does not work
- 4.12.7 broke zod validation HOT 2
- Not assignable to parameter of type 'ZodType<any, ZodTypeDef, any>' error on toTypedSchema HOT 1
- Dynamic custom checkbox and dynamic input value update issue - Composition API
- Trying to set a custom error message using setFieldError against a Field
- Custom input not working with yup.ref()
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.