refactor: replace string validations with ZNameSchema across multiple components for consistency

This commit is contained in:
Catalin Pit
2026-06-15 15:59:52 +03:00
parent 881e985b73
commit daf01ac77b
14 changed files with 35 additions and 24 deletions
@@ -1,9 +1,10 @@
import { ZNameSchema } from '@documenso/lib/types/name';
import { zEmail } from '@documenso/lib/utils/zod';
import { z } from 'zod';
export const ZCreateOrganisationEmailRequestSchema = z.object({
emailDomainId: z.string(),
emailName: z.string().min(1).max(100),
emailName: ZNameSchema,
email: zEmail().toLowerCase(),
// This does not need to be validated to be part of the domain.