const Joi = require('joi');

const contactFormSchema = Joi.object({
    name: Joi.string()
        .min(2)
        .max(255)
        .required(),

    email: Joi.string()
        .email({ minDomainSegments: 2})
        .required(),

    phone: Joi.string()
        .min(3)
        .max(16)
        .required(),

    message: Joi.string()
        .min(2)
        .max(10000)
        .required(),

    recaptcha_token: Joi.string()
        .required(),

})

const quFormSchema = Joi.object({
    quId: Joi.string()
        .required(),

    quName: Joi.string()
        .required(),

    quAns: Joi.string(),

    recaptcha_token: Joi.string()
        .required(),

})

module.exports = {
    contactFormSchema,
    quFormSchema,
}