import { z } from 'zod';

const validationMessages = {
    name: {
        minLength: 'Name must be at least 3 characters.',
        maxLength: 'Name must contain at most 50 characters.',
    },
    email: {
        invalid: 'Please provide a valid email address.',
    }
};

export const TreeSchema = z.object({
    name: z.string()
        .min(3, validationMessages.name.minLength)
        .max(50, validationMessages.name.maxLength),
    email: z.string()
        .email(validationMessages.email.invalid)
});
