teqo-backup/src/lib/schemas/comment.ts
Francisco Ignácio Fontoura Solla f804da60eb Including page mandato-no-whatsapp
2026-03-14 18:07:40 -03:00

12 lines
308 B
TypeScript

import { z } from 'zod'
export const commentSchema = z.object({
comment: z
.string()
.trim()
.max(1000, 'Comentário muito longo')
.refine((v) => !/<\/?[a-z][\s\S]*>/i.test(v), 'O comentário não pode conter HTML')
.optional(),
})
export type Comment = z.infer<typeof commentSchema>