Files
myeasycms-v2/packages/features/accounts/src/schema/update-email.schema.ts
Giancarlo Buomprisco 4bc8448a1d Unify workspace dropdowns; Update layouts (#458)
Unified Account and Workspace drop-downs; Layout updates, now header lives within the PageBody component; Sidebars now use floating variant
2026-03-11 14:45:42 +08:00

21 lines
429 B
TypeScript

import * as z from 'zod';
export const UpdateEmailSchema = {
withTranslation: (errorMessage: string) => {
return z
.object({
email: z.string().email(),
repeatEmail: z.string().email(),
})
.refine(
(values) => {
return values.email === values.repeatEmail;
},
{
path: ['repeatEmail'],
message: errorMessage,
},
);
},
};