Untitled
const RetailerCreateShema = Joi.object({ name: Joi.string().min(3).max(30).required(), email: Joi.string().email().required(), image: Joi.string(), phone: Joi.string().min(10).max(13).required(), // .pattern(/[6-9]{1}[0-9]{9}/).required(), password: Joi.string().min(8).required(), passwordConfirm: Joi.ref('password'), address: { city: Joi.string().min(3).max(50), address: Joi.string().min(3).max(60), zipCode: Joi.string().max(7) }, company_name: Joi.string().min(3).max(50).required(), province: Joi.string().min(3).max(50).required(), ice: Joi.string().alphanum().min(3).max(50).required(), id_fiscal: Joi.string().alphanum().min(3).max(50).required(), register_commerce: Joi.string().alphanum().min(3).max(50).required(), taxe: Joi.string().alphanum().min(3).max(50).required(), cnss: Joi.string().alphanum().min(3).max(50).required(), rib: Joi.string().alphanum().min(3).max(50).required(), pricingType: Joi.number().min(1).max(3).required(), request_retailer_id: Joi.string(), payment_method: Joi.string().valid("cmi" ,"cash", "both") });
Leave a Comment