Unified Account and Workspace drop-downs; Layout updates, now header lives within the PageBody component; Sidebars now use floating variant
21 lines
429 B
TypeScript
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,
|
|
},
|
|
);
|
|
},
|
|
};
|