automated dev db build

This commit is contained in:
blaisadmin
2026-05-21 17:27:57 -04:00
parent 4715306d14
commit df3fcbf885
3 changed files with 177 additions and 87 deletions
+12 -2
View File
@@ -234,13 +234,23 @@ const lostBirdReportSchema = z.object({
});
const publicProfileCodeSchema = z.string().trim().regex(/^[A-Za-z0-9_-]{8,32}$/);
const birdProfileListSchema = z
.string()
.trim()
.max(1000)
.refine(
(value) => value.split(/\r?\n/).map((item) => item.trim()).filter(Boolean).length <= 3,
'Use no more than three list items.',
)
.optional()
.or(z.literal(''));
const birdSchema = z.object({
name: z.string().trim().min(1).max(120),
tagId: z.string().trim().max(80).optional().or(z.literal('')),
species: z.string().trim().min(1).max(120),
motivators: z.string().trim().max(1000).optional().or(z.literal('')),
demotivators: z.string().trim().max(1000).optional().or(z.literal('')),
motivators: birdProfileListSchema,
demotivators: birdProfileListSchema,
favoriteSnack: z.string().trim().max(160).optional().or(z.literal('')),
gender: birdGenderSchema.optional(),
dateOfBirth: dateStringSchema.optional().or(z.literal('')),