Skip to content

Releases: ciscoheat/sveltekit-superforms

v1.13.4

20 Jan 09:23
Compare
Choose a tag to compare

Fixed

  • Error set on the server with setError didn't show up when submitting the form with an enter keypress.

v1.13.3

14 Jan 14:42
Compare
Choose a tag to compare

Fixed

  • Using full version of klona to address a cloning issue. (#312)
  • Nullable nested objects couldn't be reassigned with $form when null. (#311)

v1.13.2

07 Jan 12:45
Compare
Choose a tag to compare

Fixed

  • The timers didn't reset after navigation in certain cases.
  • Exported FormPathType in top export.

v1.13.1

22 Dec 05:20
Compare
Choose a tag to compare

Added

  • strict option added to superValidate, to ensure that all schema fields exist. In the default non-strict mode, non-existing fields are automatically using their default value. (#295, thanks to 21RISK for the PR)

Fixed

  • Upgraded to faster cloning library (klona)

v1.12.0

14 Dec 22:15
Compare
Choose a tag to compare

Added

  • Support for Zod branded types in schemas. (#286)
  • Peer dependencies updated to support SvelteKit 2. (#299)

Fixed

  • Tainted fields were set to undefined when not needed, unwantingly triggering client-side validation.
  • Schema transformations now updates the form data depending on input type. Checkboxes, radio buttons and selects updates the data immediately. Other inputs waits until blurred. (#298)
  • In SPA mode, the novalidate attribute now only disables the browser validation constraints, not the entire client-side validation. (#297)
  • Errors thrown in hooks are now handled properly by onError. Status will always be 500 though. (#292)

v1.11.0

28 Nov 06:29
Compare
Choose a tag to compare

Added

  • A fieldErrors store is added to arrayProxy, so field errors (for items in the array, not the array itself) can be accessed.

Fixed

  • When cancelling a request, timers were cancelled too early in SPA mode and when client-side validation failed.
  • Proxies didn't set or update a nested path unless it previously existed.
  • When the taint option was set to false or untaint-all, client-side validation was prevented.
  • The novalidate and formnovalidate attributes on forms and buttons weren't respected. (#287)

v1.10.2

14 Nov 15:41
Compare
Choose a tag to compare

Fixed

  • Timers weren't starting until after onSubmit, which allowed multiple form submissions on longer async operations. (#284)
  • Fixed constraints on fields that starts with a number. (#285)

v1.10.1

07 Nov 15:49
Compare
Choose a tag to compare

Added

  • Added arrayProxy, for proxying arrays and their errors in the form data. Example available on Stackblitz.
  • Added FormPathArrays type, enumerating all arrays in an object as string accessors. Used to access arrayProxy in a type-safe manner.
  • formFieldProxy now has a taint option, in case a modification should not taint the form.

v1.9.0

31 Oct 13:51
Compare
Choose a tag to compare

Added

  • In app.d.ts, by declaring namespace App.Superforms with a type Message, status messages will always be set to that type. (#261)
  • Added FormResult<T>, which can be used in onResult to make the ActionResult strongly typed.
  • SuperDebug now has a collapsed prop, to make it initially collapsed. Use together with collapsible. (#279)

Fixed

  • Schema transform operations weren't applied in SPA forms and when posting to the server with client-side validators enabled.

v1.8.0

02 Oct 13:29
Compare
Choose a tag to compare

Fixed

  • Array errors were always added, even if the array or any data in it hadn't tainted the form.

Added