import{z as e}from"zod";const t=[`name`,`email`,`phone`],n=4,r=100,i=e.object({name:e.string({message:`User Name must be a string.`}).min(4,`User Name must be at least 4 characters long.`).max(100,`User Name must be at most 100 characters long.`),email:e.string({message:`User Email must be a string.`}).email(`User Email must be a valid email address.`),phone:e.string({message:`User Phone must be a string.`}).min(8,`User Phone must be at least 8 characters long.`).max(20,`User Phone must be at most 20 characters long.`).regex(/^\+?\(?\d{3}\)?[-\s.]?\d{3}[-\s.]?\d{4,6}$/,`User Phone must be a valid phone number.`)}),a=(e,n=t)=>{let r=n.reduce((e,t)=>(e[t]=!0,e),{}),a=i.pick(r).safeParse(e);return a.success?{}:a.error.flatten().fieldErrors};export{r as NAMES_MAX_LENGTH,n as NAMES_MIN_LENGTH,a as validateUser};
//# sourceMappingURL=validateUser.mjs.map