Skip to content

Improve zod + react-hook-form #678

Description

@tobeycodes

For type safety we should avoid union of types e.g. accepts an empty string or optional. We should not put things like an empty string into the database

.or(z.literal(''))
.optional(),

We should add default values to our forms to avoid having errors like:
Image

We should avoid doing just z.string() as that will accept an empty string. Currently we can add a network without a name
Image

Note: These would apply across the codebase but just one example

Metadata

Metadata

Assignees

Labels

needs-specThis issue needs a clear specification. (Do not create a pull request for this issue)

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions