pwa and mobile client
This commit is contained in:
@@ -9,6 +9,13 @@ export const cardFieldsSchema = z.object({
|
||||
color: colorSchema,
|
||||
code: z.string().min(1, 'Code is required').max(4000),
|
||||
codeType: z.enum(CODE_TYPES),
|
||||
// Free text, may be multiline. No default: partial updates must not clear it.
|
||||
// Multipart forms send CRLF line breaks: store plain LF.
|
||||
comment: z
|
||||
.string()
|
||||
.transform((s) => s.replace(/\r\n?/g, '\n').trim())
|
||||
.pipe(z.string().max(2000, 'Comment is too long (max 2000 characters)'))
|
||||
.optional(),
|
||||
});
|
||||
export type CardFields = z.infer<typeof cardFieldsSchema>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user