mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-10 00:54:20 +01:00
refactor: remove max(2) in languageSchema
This commit is contained in:
@@ -41,7 +41,7 @@ const fileSchema = z.custom<File>((value) => value instanceof File);
|
||||
|
||||
const percentageSchema = z.coerce.number().int().gte(1).lte(100);
|
||||
|
||||
const languageSchema = z.string().max(2).transform((val, ctx) => {
|
||||
const languageSchema = z.string().transform((val, ctx) => {
|
||||
if (!ISO6391.validate(val)) {
|
||||
ctx.addIssue({
|
||||
code: z.ZodIssueCode.custom,
|
||||
|
||||
Reference in New Issue
Block a user