fix(frontend): clean test validation output

This commit is contained in:
Sanaei
2026-08-12 15:35:20 +02:00
parent 1c255fc00c
commit 1f846c3cb2
9 changed files with 64 additions and 13 deletions
+9
View File
@@ -104,6 +104,15 @@ export const AllSettingSchema = z.object({
export type AllSettingInput = z.infer<typeof AllSettingSchema>;
// Existing installations can contain regex values saved before the backend
// enforced its 2,048-character limit. Accept those values when reading so the
// settings page can display and let users correct them, while keeping the
// stricter schema above for outgoing updates.
export const AllSettingResponseSchema = AllSettingSchema.extend({
subJsonUserAgentRegex: z.string().optional(),
subClashUserAgentRegex: z.string().optional(),
});
export const FactoryDefaultsSchema = z.record(z.string(), z.string());
export type FactoryDefaults = z.infer<typeof FactoryDefaultsSchema>;