You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this way null values pass the validation and after tranform it to undefined, so that zod remove the fields from the output.
How can I achieve this by editing the template.hbs?
The text was updated successfully, but these errors were encountered:
adelloste
changed the title
Accept null as input value of a schema but not as a valid output
[Question] Accept null as input value of a schema but not as a valid output
Nov 20, 2024
I have a large schema with several nullable fields. Is there any way to generate the schema, so that the input allows null, while the output does not?
Let's say I have this auto-generated schema:
I can achieve this with a
transform
:In this way null values pass the validation and after tranform it to undefined, so that
zod
remove the fields from the output.How can I achieve this by editing the template.hbs?
The text was updated successfully, but these errors were encountered: