svelte-forms icon indicating copy to clipboard operation
svelte-forms copied to clipboard

[BUG] validateOnChange prevents fields from being marked as dirty

Open jhwheeler opened this issue 1 year ago • 0 comments

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:

  1. Create a field and set validateOnChange to false:
const emailField = field('email', '', [required(), email()], { validateOnChange: false })
  1. Type in the field
  2. dirty never changes from false to true

Expected behavior The option validateOnChange should not affect the dirty check, only validation itself.

jhwheeler avatar May 13 '24 01:05 jhwheeler