Skip to content

Releases: ciscoheat/sveltekit-superforms

v1.5.2

15 Aug 16:24
Compare
Choose a tag to compare

Fixed

  • Forms in components weren't resetted properly when destroyed and created again.

v1.5.1

09 Aug 18:06
Compare
Choose a tag to compare

Fixed

  • In rare cases, timers weren't resetted when redirecting to the same route.
  • Client-side validation was ignored when a data property was missing or didn't match the schema type. It now fails with a console error. (#243)

v1.5.0

23 Jul 08:56
Compare
Choose a tag to compare

Fixed

  • A boolean schema field didn't accept a boolean false value when posted, it was coerced as true.
  • A SuperDebug truncated string showed only the whole string length, not the truncated.

Added

  • Added customValidity option to superForm, which will use the browser's validation message reporting for validation errors. More information and an example here.
  • Added emptyIfZero option to numberProxy and intProxy.

v1.4.0

20 Jul 10:40
Compare
Choose a tag to compare

Fixed

  • When multiple forms exists with the same id, the warning is now displayed on superForm instantiation, not just when new form data is received.
  • Fixed client-side validation for Date schema fields. (#232)
  • numberProxy and intProxy now works with the empty option. (#232)
  • Fixed timer state in combination with navigation events.

Added

  • Added delimiter option to numberProxy.

v1.3.0

14 Jul 13:52
Compare
Choose a tag to compare

Fixed

  • Fixed persisting form data when component used data from $page in combination with onDestroy. (#164, thank you to everyone in that thread!)
  • Fixed exception message when the dataType option isn't set to 'json' and the schema contains a nested object. (#225)
  • Superforms are now ignoring normal SvelteKit form actions when they are posted. (#230)

Added

  • More configuration options, customizable styling, automatic promise and store support for SuperDebug, thanks to Josue!

v1.2.0

06 Jul 10:26
1f9eb0f
Compare
Choose a tag to compare

Added

  • The scrollToError option can now take the same parameters as scrollIntoView, which makes it work for nested scrollbars.
  • Added setError signature, to more conveniently set a form-level error: setError(form, 'Form-level error message')

Fixed

  • If the resetForm option was enabled, the form was reset even if fail was returned.

v1.1.3

29 Jun 18:38
Compare
Choose a tag to compare

Fixed

  • Form-level errors couldn't be overwritten.
  • Array-level errors couldn't be added with setError.
  • Native string enums weren't working when posting the actual string value.

v1.1.2

24 Jun 09:55
Compare
Choose a tag to compare

Added

  • Svelte 4 compatibility.

v1.1.1

20 Jun 16:58
Compare
Choose a tag to compare

A quick-fix for the Set feature in 1.1.0.

Fixed

  • Set comparison added in 1.1.0 wasn't fully functional.

v1.1.0

20 Jun 15:24
Compare
Choose a tag to compare

Added

  • Support for Set in schemas, using z.set().

Fixed

  • Nested array and object-level errors are now all cleared on a successful client-side validation. (#196)
  • Boolean fields with a default value of true always returned true when validating.
  • Fixed infinite deep type instantiation on message. (#143, thanks to Alisson Cavalcante Agiani)
  • Fixed typesVersions map that caused incorrect auto-import paths (#191, thanks to CokaKoala)