svelte-forms
svelte-forms copied to clipboard
[REQUEST] Add option for only manual validation of a combined field
Is your feature request related to a problem? Please describe.
I have two fields that get validated only on:blur
. There is a combined field comprised of the other two, that performs additional validation of the two fields. Since the combined field validators are called whenever there is any change in the two fields, it is as if the two are checked on:change
, which results unwanted and unnecessary validations (and many API requests).
Describe the solution you'd like
Would be great to have an option like manualValidation
in combined fields to only validate manually. So when that option is enabled, validation will occur only when explicitly called. As a default it should probably be false
.
Additional context
If this is implemented, perhaps it should come with a valid
option for combined fields, so one could set valid
to false
and with that make sure that manual validation must be called for the combined field.
Hi again @omer-g,
Private life's been a bit busy recently. If you are willing to make a change and create a pull request it would be cool! otherwise i'm going to work on it as soon as I can.
No worries, thank you for your response. I don't think I will get to making the change myself.