Releases: Crowd9/vuelidate
Releases · Crowd9/vuelidate
Release list
v1.0.0-gleam-20260713
Security updates on underlying packages
Security updates on underlying packages
Upgrade packages
v1.0.0-gleam-20260427 Upgrade underlying packages
Upgrade packages
Forward $active rule prop to validator results
New features
Forwards an $active ref property from conditional validation rule definitions (When helper in upstream main app project). Allows it to be forward from the rule to returned validation results and thus accessible via validationState (v$) for consumer implementations like:
- counting current active rules
- conditional call validators based on active truthyness
Before this patch, our conditional helpers relied on an active flag using
$params.activewhich revealed a bad solution as it triggered infinite loops as$paramsare watched by recomputing rules trigger infinite watching cb.- We workaround the infinite loop with a non-reactive moduleScoped active property, bound to a lodash
_.uniqueIdwhich solved the infinite but loop but break results cache, as it still triggered the watcher although not infinitely, recreating the validation result with an outdated and unwanted value.
Notes
- This is an "add only" feature, it doesn't break or tweak any existent behaviour, if you don't add an $active prop to your validators everything works business as usual
- Also note that with this current implementation, active is not computed internally which means that by itself it does not prevent validator functions from running. Currently it is only used for our main app
Whenhelper which does that implementation upstream. I have a plan for doing it internally, but out of scope of this release as it touches a few core parts.
Only Necessities
v1.0.0-gleam-v1-only-necessities Complete NPM migration
Testing no vue-demi
v1.0.0-gleam-v1-no-vue-demi-v2 Lose vue-demi
Testing terser deletion
v1.0.0-gleam-v1-no-terser Loose terser
Testing no learn
v1.0.0-gleam-v1-no-learn Lose lerna
Testing babel deletion
v1.0.0-gleam-v1-no-babel Rebuild the project