Hey,
I have been using vuelidate and loving it. Having experienced using vue-validate before I appreciated being able to detect $error, $dirty and so on. However I would like to suggest the behaviour to be more inline with vue-validate in that
Update $dirty when the value has been modified from it's initial state at least once
Add $touched for when the value has been $v.foo.$touch()
Add $modified for when the value is not the same as the initial value
Also when $v.foo.touch and the it becomes $dirty (or $error etc) the top level $v.$dirty etc should be updated as well.
Is this possible?
For top level dirty propagation please check:
I'd rather not add any of those additional options, as modified from initial value is very vague. What does "initial" value really means? What if I need to change that "initial" value after some time? That's very custom and situational logic, IMO should be implemented outside of validations. Nothing prevents you adding additional logic variable into your error display code. Just make a module/mixin/component that gives you that functionality and use it everywhere you need it.
For more reasoning behind $dirty, you can check #67 too.
I consider that solved, so closing, but feel free to continue this discussion in case you think I'm missing something.
Hello, I really love vualidate to, but it would be so much easier to show messages in html about the validations like "this field is required" if the variable required from fields includes the dirty check, otherwise i have to make a computed value from every field to know if its ready to show the message :) is it possible ?
Related to #84