diff --git a/frontend/src/components/auth/RegisterForm.tsx b/frontend/src/components/auth/RegisterForm.tsx index f67ae5a..d8a433e 100644 --- a/frontend/src/components/auth/RegisterForm.tsx +++ b/frontend/src/components/auth/RegisterForm.tsx @@ -33,11 +33,7 @@ const createRegisterSchema = (t: (key: string) => string) => .min(1, t('firstNameRequired')) .min(2, t('firstNameMinLength')) .max(50, t('firstNameMaxLength')), - last_name: z - .string() - .max(50, t('lastNameMaxLength')) - .optional() - .or(z.literal('')), // Allow empty string + last_name: z.string().max(50, t('lastNameMaxLength')).optional().or(z.literal('')), // Allow empty string password: z .string() .min(1, t('passwordRequired')) diff --git a/frontend/tests/__mocks__/next-intl.tsx b/frontend/tests/__mocks__/next-intl.tsx index 10c3f17..a969557 100644 --- a/frontend/tests/__mocks__/next-intl.tsx +++ b/frontend/tests/__mocks__/next-intl.tsx @@ -4,7 +4,9 @@ export const useLocale = jest.fn(() => 'en'); export const useTranslations = jest.fn(() => (key: string) => key); -export const NextIntlClientProvider = ({ children }: { children: React.ReactNode }) => <>{children}; +export const NextIntlClientProvider = ({ children }: { children: React.ReactNode }) => ( + <>{children} +); export const useFormatter = jest.fn(() => ({})); export const useMessages = jest.fn(() => ({})); export const useNow = jest.fn(() => new Date());