This release includes some performance benefits and new features
🐛 Fixed
- perf: cache the listeners generated by vee-validate 6dc9fad
- perf: when using ValidationProvider as a slotted wrapper it caused max-callstack errors. #2262 #2347 #2185
- params with falsy values not being used in interpolation #2332
textarea
not being identified as a text input #2333- the
required
flag not being restored after callingreset()
#2323
✨ Enhancements
Allow returning messages directly in the validate
function, allowing you to create more complex rules while being very concise.
Here is a quick sample:
import { extend } from "vee-validate";
extend('rule', value => {
if (value === "heck") {
return "You cannot say any of the H words.";
}
if (value === "frick") {
return "You cannot say any of the F words.";
}
return true;
});