svelte-forms
svelte-forms copied to clipboard
[BUG] validateOnChange prevents fields from being marked as dirty
Describe the bug
When you pass validateOnChange: true to a field's options, the field is not marked dirty when you change its value.
To Reproduce Steps to reproduce the behavior:
- Create a field and set
validateOnChangetofalse:
const emailField = field('email', '', [required(), email()], { validateOnChange: false })
- Type in the field
dirtynever changes fromfalsetotrue
Expected behavior
The option validateOnChange should not affect the dirty check, only validation itself.