react-query-questions
solid-query-questions
table-questions
virtual-questions
router-questions
react-charts-questions
ranger-questions
vue-query-questions
svelte-query-questions
bling-questions
form-questions
angular-query-questions
start-questions
db-questions
start-showcase
router-showcase
📣-announcements
Programmatically clear errors on specific (array) fields

What to use when the Backend returns a form error? Validator vs Submit
onSubmit
validators. They are there so we do basic validations (through zod) like numbers, minimum characters, etc.
I also have a regular onSubmit
prop where I call the backend if the validator checks that everything is okay.
...possible to use withForm with 2 almost identical schemas
Persistent form state support in TanStack Form?
Type safety with prebound Form components
State and Inertia.js integration
Partial reset of a modified form
RHF's onTouched mode
onTouched
mode? There doesn't appear to be an equivalent option for validators
.
https://www.react-hook-form.com/api/useform/#mode...`field.state.meta.isValid` not updated when validating on the server
field.state.meta.isValid
is true in Next.js after server validation, unless I also apply the same validation on the client. Shouldn't that state be merged by mergeForm
? Would be a lot easier DX if I could just rely on field.state.meta.isValid
and field.state.meta.errors
instead of having to merge those manually.Why can field validation overwrite form validation errors?
Something worth mentioning is that if you have a form validation function that returns an error, that error may be overwritten by the field-specific validation.I was wondering what the rationale is for this behavior/limitation?
errorMap
already stores errors from different points in the form lifecycle (onBlur
/onChange
etc), why not also store form
/field
errors separately?...Form persistence
Sharing form type to custom hooks for cleaner code
Default values with zod validation
dynamic defaultValues
draft.content
, draft.title
and published.content
, published.title
.
On the "Draft" tab there are "Publish" and "Save draft" buttons.
- Publish button is submitting the data as "published" entry, and then deletes the "draft" entry, and resets the draft.xxx
fields, and resets the default values for the published.xxx
fileds.
- Save draft button is saving the values as "draft" entry (idk if the form should be reset in this case?...)...Async form default based on another field
form is populating with errors but errors.status logging as 'clean'
custom reusable form.Field component, trying to use Form Composition
Is it possible to persist form state?
Type inference issue with MomentJS