Skip to content

Commit

Permalink
fix: fix update record form validation
Browse files Browse the repository at this point in the history
  • Loading branch information
nichenqin committed Nov 13, 2024
1 parent 5aaa8ff commit c695ffe
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@
validators: zodClient(schema),
resetForm: false,
invalidateAll: false,
onSubmit(input) {
validateForm({ update: true })
},
onChange(event) {
validateForm({ update: true })
},
onUpdate(event) {
if (!event.form.valid) {
return
Expand All @@ -93,7 +99,7 @@
},
})
const { form: formData, enhance, allErrors, tainted, reset, errors } = form
const { form: formData, enhance, allErrors, tainted, reset, errors, validateForm } = form
$: mutableFields = fields.filter((f) => f.isMutable)
$: taintedKeys = Object.keys($tainted ?? {})
Expand Down

0 comments on commit c695ffe

Please sign in to comment.