Closed ryanballa closed 3 years ago
Hey Ryan
I've now updated svelte-use-form to 2.2.0
.
By setting the new property touched
on the $form object, you'll set touched = true to every form control in the form. This results in Hints being shown and the .touched class being added to the inputs.
Since svelte-use-form validates on mount and when anything changes in the fields, a manual validation is not required.
Here's the example you're looking for REPL
And thanks for pointing out this use case!
Is there an example of how one would run validations on submit? I'd like to keep the submit active and allow users to click it but only proceed if no errors are present. I'd also like all the errors to show if they should be visible.