zod
"TypeScript-first schema validation with static type inference"
Dependencies
Importing the validator
Generate your types
If you generate your types before writing validation, they will be available to help you define the constraint.
Validate
To validate, just run the validate command: