New Features
This release contains new DX features and refined docs.
Enhanced Cross-Field Validation
Now you can reference any field's value using @id
where id
is the field's name
or vid
prop. This works for any rule without having to define isTarget
which will slowly be deprecated. Huge thanks to @davestewart for #2443
Performance Improvements
The ValidationObserver
when observing too many fields caused serious performance issues, which was the cost of computing a combined state for too many providers, the observer now by default is debounced in its computations, meaning it doesn't calculate changes immediately. This shouldn't be noticeable at all for your users, Aside from the huge performance boost 😉.
New passed
and failed
flags
These two new flags allow you to provide better UX to your users, the valid
and invalid
flags are what I call absolute truth
flags, meaning they always reflect the validity of the field regardless of the user interacted with the form or not, which often caused you to combine them with validated
flag to ensure that you apply correct UI styling.
The passed
and failed
flags are just that, a combination of validated
and their respective invalid
or valid
flags to make your templates much cleaner.
Re-written Docs
I have re-written the docs from the ground up, tackling many of the issues that annoyed the developers, I might still be missing a lot of points so make sure to provide feedback. Also, live examples have been built in with custom snippets and forking to codesandbox!
You will notice a couple of shiny new stuff, The docs now have algolia search running and should be indexing the new stuff soon.
Make sure to read the new docs and provide feedback!