Closed RomkeVdMeulen closed 4 years ago
@RomkeVdMeulen This feature sounds nice, and doesn't sound hard to achieve. Wanna give it a go? Would be awesome if we could have some help ❤️
I'd love to, but I'm a bit swamped and I have a project next week, so it won't be before the 14th.
@bigopon Could you take a look at the PR? I think it should be ready to be merged in.
I'm submitting a feature request
Current behavior: By default validation is triggered onChange and onBlur, according to the docs (although the
ValidationController
sets the trigger to blur by default: is the doc out of date?). These default triggers are baked in and can only be overridden case by case by using a different binding behavior or changing theValidationController
'svalidateTrigger
after injection.Expected/desired behavior: I'd like to be able to specify the default validation triggers for my entire app rather than on an individual binding level.
What is the motivation / use case for changing the behavior? After reading that validating input as the user types, or on blur, can be problematic I tried to switch all validation in my app at once to only validate on submit. So far as I can tell, the only way to achieve this is to replace each
& validate
binding behavior with& validateOnBlur
or to set eachValidationController
'svalidateTrigger
to manual after injection. I'd like to be able to configure this once at plugin registration.