Make please the option to validate fields onChange/onInput events + default onSubmit ofc
SergeyXXI opened this issue · comments
Hi!
I've noticed form validating only after Submit event. Cool, but oftenly site owners like more onInput/onChange behavior validation. Make please such option to choose on JustValidate instance initiation and in addField method custom configuration.
And btw, I've noticed your validator for custom validation works immediately(like immitating onInput event) before submiting form, i.e before form validation start. Why? If I need some side effect in validator I get it instantly too. Maybe consider to make it in one way simultaneously? If form validation starts after submitting, then validator should also start work after Submit event, don't you think so?
Thx for atteniton! Big much!
Hi, could you please provide some example when the custom validation triggers before submitting the form? As I can see this is not happening:
https://just-validate.dev/examples/#advanced
https://just-validate.dev/examples/#async
Also, I'll think about the option to allow validation before submitting the form. It could be useful, thanks
Added a flag validateBeforeSubmitting
to trigger validation before clicking the submit button
https://just-validate.dev/examples/#validate-before-submitting