Validation and error handling #365
tordans
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to manage a table of contact in my NextJS app using react-datasheet-grid.
What I am missing so far are docs on how to handle validations and errors.
Some use cases:
I have an contact.email field that is required, so it can never be null.
However, AFAIK the library requires field to be nullable.
The same contact.email field should always be a valid email address.
Suggestions:
Ideally I could provide a
updateSchema={ZodUpdateSchema}
and acreateSchema={ZodCreateSchema}
where I can clarify those requirements and the library would handle showing error messages whenever those validations fail.The error messages could be a css class to make the cell red and a info
(!)
icon inside the cell to show the error in line with the cell.Search: Nothing on zod or validation, yet
Beta Was this translation helpful? Give feedback.
All reactions