Skip to content

Releases: ciscoheat/sveltekit-superforms

v0.8.2

24 Apr 13:44
Compare
Choose a tag to compare

[0.8.2] - 2023-04-24

Fixed

  • allErrors stopped working when realtime validation errors were cleared.
  • Large payloads with dataType: 'json' still didn't work, fixed now.

[0.8.1] - 2023-04-24

Fixed

  • Realtime validation didn't work for Zod schemas without effects.

[0.8.0] - 2023-04-22

Changed

  • Client-side validators now works in realtime, based on "reward early, validate late": If no field error, validate on blur. If field error exists, validate on input.

Removed

  • The rarely used update function is removed. Use form instead, which now has an option for not tainting the affected fields.

Fixed

  • tainted wasn't updated properly for array data.
  • dataType: 'json' now handles large (+1Mb) payloads.

Added

  • Added validate to superForm, which can be used to validate any field, at any time.
  • Client-side validation can be customized with the validationMethod: 'auto' | 'oninput' | 'onblur' | 'submit-only' option.
  • The option { taint: boolean | 'untaint' | 'untaint-all' } has been added to form.set and form.update.
  • The resetForm option can now take an async () => boolean function to determine whether the form should be resetted or not.