Releases: ciscoheat/sveltekit-superforms
Releases Β· ciscoheat/sveltekit-superforms
v1.13.4
v1.13.3
v1.13.2
v1.13.1
v1.12.0
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
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
oruntaint-all
, client-side validation was prevented. - The
novalidate
andformnovalidate
attributes on forms and buttons weren't respected. (#287)
v1.10.2
v1.10.1
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 accessarrayProxy
in a type-safe manner. formFieldProxy
now has ataint
option, in case a modification should not taint the form.
v1.9.0
Added
- In
app.d.ts
, by declaring namespaceApp.Superforms
with atype 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 withcollapsible
. (#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
Fixed
- Array errors were always added, even if the array or any data in it hadn't tainted the form.
Added
- formFieldProxy now contains a proxy for
tainted
.