Open Scott-MacD opened 2 months ago
Thanks for the idea. I will think about it, but unfortunately I will not have time to work on Modular Forms in the next few months.
Not a problem, I think I will take a shot at making that change for my project, happy to submit a PR if I get it figured out and you're aligned.
Yes, feel free to share your ideas. I plan to re rewrite the library as some point in the future.
Would it be possible to get an additional
useForm
config option to allow somebody to change the behaviour ofrevalidateOn
to keep using that method after a field has been made dirty?I prefer showing users an error message as soon as it is clear that they have likely made a mistake, to give the user the chance to make the corrections as they progress through a form. In order to do this, I have
validateOn
set to'change'
, andrevalidateOn
set toinput
, which works great - however as soon as the user types a value that satisfies validation, if they continue to type and cause a case that fails validation, they won't know that until they blur from the field again. It would be ideal if we could set an option so that once a field has failed validation once, it will keep using therevalidateOn
method from that point onwards.