diff --git a/Docker/.gitignore b/Docker/.gitignore index e1b726025..89aa6bfac 100644 --- a/Docker/.gitignore +++ b/Docker/.gitignore @@ -2,4 +2,5 @@ !build_images.sh mongo/data/* redis/data/* -*.env \ No newline at end of file +*.env +certbot/* \ No newline at end of file diff --git a/Server/validation/joi.js b/Server/validation/joi.js index 26e62a6db..775aee7b5 100644 --- a/Server/validation/joi.js +++ b/Server/validation/joi.js @@ -35,7 +35,17 @@ const registerValidation = joi.object({ .string() .required() .pattern(/^[A-Za-z]+$/), - email: joi.string().email().required(), + email: joi + .string() + .email() + .required() + .custom((value, helpers) => { + const lowercasedValue = value.toLowerCase(); + if (value !== lowercasedValue) { + return helpers.message("Email must be in lowercase"); + } + return lowercasedValue; + }), password: joi .string() .min(8)