add max lenght validation for create complaint/claim

This commit is contained in:
smanylov
2026-04-29 15:40:34 +07:00
parent 1e8bf782ca
commit 41c56e026f
5 changed files with 13 additions and 7 deletions
+3
View File
@@ -89,6 +89,7 @@ export const createComplaintSchema = z
textArea: z
.string()
.min(6, { error: 'text-area-error-fill-complaint-text' })
.max(2000, {error: 'text-area-error-complaint-text-too-long'})
.trim(),
})
@@ -97,10 +98,12 @@ export const createCaseSchema = z
textArea: z
.string()
.min(6, { error: 'fill-text-of-the-case' })
.max(2000, {error: 'claim-text-must-not-exceed-2000-characters'})
.trim(),
caseTitle: z
.string()
.min(6, { error: 'fill-title-of-the-case' })
.max(300, {error: 'claim-title-must-not-exceed-300-characters'})
.trim(),
})