Created
November 3, 2023 10:42
-
-
Save popeating/83673e4e57b54bb059c95d8717c47a55 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as z from 'zod'; | |
const zSchema = z.object({ | |
name: z | |
.string() | |
.min(3, { message: 'Name should have at least 3 characters' }), | |
email: z.string().email({ message: 'Email should be a valid address' }), | |
_id: z.string().optional(), | |
}); | |
export default zSchema; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment