const Joi = require('joi');

const validate = require('./validate');

const schemaCreateContact = Joi.object({
	number: Joi.string().min(8).max(14).required(),
});

module.exports.createContact = (req, _res, next) => {
	return validate(schemaCreateContact, req.body, next);
};
