sveltekit-superforms
Advanced tools
Changelog
[2.9.0] - 2024-03-12
SPA
option can now take a string, corresponding to a form action, and it will post there, even without a html form on the page. Especially useful for debounced server checks like available usernames.superForm
returned a form with an empty id, causing collisions, it is now a random string.customValidity
didn't clear without client-side validators.Changelog
[2.8.1] - 2024-03-07
page
store.Changelog
[2.8.0] - 2024-03-05
undefined
to a field in the $errors
store.onResult
.Changelog
[2.7.0] - 2024-03-03
newState
option for reset
, to set a new state for future resets. Can be used instead of the data
option.null
for nullable schema fields. Ensure that all required file fields aren't set to nullable.string
index in $errors
and $tainted
.submit
can now be passed directly to event handlers.valibot-json-schema
, with support for enum_, amongst others.ZodType
.Changelog
[2.6.2] - 2024-02-25
typeof
type, which prevented multi-type union detection.FormPath
and FormPathLeaves
didn't narrow the types correctly for Date
, Set
and File
.stringProxy
didn't accept FormPathLeaves
as path.Schema
type, for any supported validation schema.Changelog
[2.6.1] - 2024-02-24
FormPath
and its relatives, to filter the paths based on a specific type, like FormPathLeaves<T, Date>
.FieldProxy
, FormFieldProxy
and ArrayProxy
.invalidateAll
option 'force'
, to always use the load function form data, instead of the one returned from the form action. Useful when updating the form data partially, to ensure that the data is refreshed from the server (a "pessimistic" update compared to the default, which is optimistic). Setting this also bases the reset
function on the latest load function data returned for the form.defaults
didn't infer the input type, and didn't generate correct SuperValidated
data, making superForm
confused. Also fixed type signature and removed the jsonSchema
option that wasn't applicable.goto
in events didn't work when the target page redirected.FormPath
and FormPathLeaves
didn't handle fields with type unknown
and any
.