feat: add profile tooltips

This commit is contained in:
David Nguyen
2024-06-08 13:22:51 +10:00
parent 95a600001a
commit d8d9a3be77
5 changed files with 115 additions and 43 deletions

View File

@ -66,12 +66,16 @@ export type ManagePublicTemplateDialogProps = {
const ZUpdatePublicTemplateFormSchema = z.object({
publicTitle: z
.string()
.min(1, { message: 'Title must be at least 1 character long' })
.max(MAX_TEMPLATE_PUBLIC_TITLE_LENGTH),
.min(1, { message: 'Title is required' })
.max(MAX_TEMPLATE_PUBLIC_TITLE_LENGTH, {
message: `Title cannot be longer than ${MAX_TEMPLATE_PUBLIC_TITLE_LENGTH} characters`,
}),
publicDescription: z
.string()
.min(1, { message: 'Description must be at least 1 character long' })
.max(MAX_TEMPLATE_PUBLIC_DESCRIPTION_LENGTH),
.min(1, { message: 'Description is required' })
.max(MAX_TEMPLATE_PUBLIC_DESCRIPTION_LENGTH, {
message: `Description cannot be longer than ${MAX_TEMPLATE_PUBLIC_DESCRIPTION_LENGTH} characters`,
}),
});
type TUpdatePublicTemplateFormSchema = z.infer<typeof ZUpdatePublicTemplateFormSchema>;