Skip to content

Commit

Permalink
add basic test
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundhung committed Mar 28, 2024
1 parent 114c258 commit bed3598
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions playground/app/routes/subscription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ export default function Example() {
onValidate: !noClientValidate
? ({ formData }) => parseWithZod(formData, { schema })
: undefined,
onSubmit(event) {
// We should be able to access the latest form / field metadata anytime
if (!form.dirty || !(fields.name.dirty || fields.message.dirty)) {
event.preventDefault();
}
},
});
const name = fields.name.name;
const message = fields.message.name;
Expand Down

0 comments on commit bed3598

Please sign in to comment.