14 lines
337 B
TypeScript
14 lines
337 B
TypeScript
import i18n from '@/lib/i18n';
|
|
import z from 'zod';
|
|
|
|
export const profileUpdateSchema = z.object({
|
|
name: z.string().nonempty(
|
|
i18n.t('profile.messages.is_required', {
|
|
field: i18n.t('profile.form.name'),
|
|
}),
|
|
),
|
|
image: z.instanceof(File).optional(),
|
|
});
|
|
|
|
export type ProfileInput = z.infer<typeof profileUpdateSchema>;
|