Releases: ciscoheat/sveltekit-superforms
Releases Β· ciscoheat/sveltekit-superforms
v2.17.0
Deprecated
posted
is deprecated, due to inconsistencies between server and client validation, and SPA mode. It will be removed in v3. Use a status message or return your own data in the form action to handle form post status.
Added
descriptionAsErrors
option for the JSON Schema validator, so you can specify error messages directly in the schema with thedescription
field.
Fixed
- File uploads required extra configuration for the valibot adapter, now it works directly.
- Events added in
enhance
weren't cleaned up when the form was destroyed. Note that this could be deprecated in a future version. It's advised to use events only when callingsuperForm
, not withenhance
.
v2.16.1
v2.16.0
Added
- New validation library: Superstruct!
customRequest
added to the onSubmit options, that lets you use a custom fetch or XMLHttpRequest when submitting the form. Very useful for progress bars when uploading large files.
Fixed
- Type inference for validation errors didn't include
_errors
for all objects, only for arrays.
v2.15.2
Changed
- Valibot minimum dependency is now
>=0.33.0
to fix a type issue. Please follow the migration guide to update your Valibot schemas if your version is below v0.31.0.
v2.15.1
Changed
- Valibot updated to
v0.31
, which ends support for any version below that. Please follow the migration guide to update your Valibot schemas.
Fixed
- Inlined the SuperDebug css, to prevent it from being automatically bundled due to it being a default import.
- The customValidity option now handles object errors, and can refer to any part of the schema.
- Arktype code wasn't excluded from bundle due to not being dynamically loaded.
v2.14.0
v2.13.1
Fixed
FormPath
et al. now extends only basic objects and arrays, avoiding issues with classes, all built-in objects likeFile
andDate
, and special "branded" types that validation libraries are using. Thanks to Matt DeKok for this fix!- SuperDebug always renders left-to-right now.
- Discriminated unions for the form itself weren't including the union keys for the schema, when parsing the form data.
devalue
updated to^5.0.0
to handle invalid dates.
v2.13.0
Added
- Support for "raw" JSON Schema validation with the new schemasafe adapter. Thanks to sukeshpabolu for the initial work on this!
Fixed
- Errors weren't reset properly when the form was resetted, causing client-side validation to behave like the field was tainted.
v2.12.6
Fixed
- The Zod adapter didn't handle reused schemas ($ref) properly.
- The "GET to POST" modification for
use:enhance
was only intended for SPA mode to fully support progressive enhancement, so it now properly checks for that before adding the missingmethod="POST"
attribute on the form. - The tainted message didn't trigger on page refresh or closing a tab in the browser.
FormPathLeaves
caused a memory leak when usingsvelte-package
.
v2.12.3
Fixed
- SuperDebug support for
Map
andSet
. submit
method now falls back to submit, if no support for requestSubmit in browser.isTainted
now handles the type of$tainted
in generic components.id
option for superForm (not superValidate) wasn't used in multiple form scenarios.- Fixed
FormResult
type that can be used inonUpdate
, it didn't filter outSuperValidated
.