fix: Update language validation regex to support locale variants
This commit is contained in:
@@ -70,8 +70,7 @@ export const ProjectSchemas = {
|
|||||||
tracking: z.nativeEnum(TrackingMode).optional(),
|
tracking: z.nativeEnum(TrackingMode).optional(),
|
||||||
language: z
|
language: z
|
||||||
.string()
|
.string()
|
||||||
.length(2)
|
.regex(/^[a-z]{2}(-[A-Z]{2})?$/)
|
||||||
.regex(/^[a-z]{2}$/)
|
|
||||||
.optional(),
|
.optional(),
|
||||||
}),
|
}),
|
||||||
} as const;
|
} as const;
|
||||||
|
|||||||
Reference in New Issue
Block a user