{"size": 800, "ext": "js", "max_stars_repo_path": "server/src/validators/sessionValidator.js", "max_stars_repo_name": "leoronne/BeTheHero", "max_stars_repo_stars_event_min_datetime": "2020-03-26T12:12:28.000Z", "max_stars_repo_stars_event_max_datetime": "2020-03-31T15:56:15.000Z", "max_issues_repo_path": "server/src/validators/sessionValidator.js", "max_issues_repo_name": "leoronne/BeTheHero", "max_issues_repo_issues_event_min_datetime": "2022-02-27T01:50:42.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-27T01:50:42.000Z", "max_forks_repo_path": "server/src/validators/sessionValidator.js", "max_forks_repo_name": "leoronne/BeTheHero", "max_forks_repo_forks_event_min_datetime": "2020-03-27T17:44:04.000Z", "max_forks_repo_forks_event_max_datetime": "2020-04-08T19:57:07.000Z"}
{"max_stars_count": 6, "max_issues_count": 1, "max_forks_count": 7, "avg_line_length": 40.0, "max_line_length": 173, "alphanum_fraction": 0.46}
const { Segments, Joi } = require('celebrate');

module.exports = {
      login: {
            [Segments.BODY]: Joi.object().keys({
                  EMAIL: Joi.string().required().email().error(new Error('Invalid email!')),
                  PASSWORD: Joi.string().required().regex(new RegExp('^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})')).error(new Error('Invalid password!'))
            })
      },
      validateToken: {
            [Segments.QUERY]: {
                  token: Joi.string().required().error(new Error('Token field is required!')),
            }
      },
      sendEmail: {
            [Segments.BODY]: Joi.object().keys({
                  EMAIL: Joi.string().required().email().error(new Error('Invalid email!')),                  
            })
      },
}