diff --git a/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/create/components/client/create-ecosystem-form.client.tsx b/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/create/components/client/create-ecosystem-form.client.tsx index 11ee2de0a1c..8131bb60379 100644 --- a/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/create/components/client/create-ecosystem-form.client.tsx +++ b/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/create/components/client/create-ecosystem-form.client.tsx @@ -31,9 +31,13 @@ const formSchema = z.object({ .refine((name) => /^[a-zA-Z0-9 ]*$/.test(name), { message: "Name can only contain letters, numbers and spaces", }), - logo: z.instanceof(File, { - message: "Logo is required", - }), + logo: z + .instanceof(File, { + message: "Logo is required", + }) + .refine((file) => file.size <= 500 * 1024, { + message: "Logo size must be less than 500KB", + }), permission: z.union([z.literal("PARTNER_WHITELIST"), z.literal("ANYONE")]), }); @@ -119,7 +123,6 @@ export function CreateEcosystemForm(props: { teamSlug: string }) { onUpload={(files) => { if (files[0]) { form.setValue("logo", files[0]); - form.clearErrors("logo"); } }} />