Skip to content

Commit

Permalink
fixed joi
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Dec 2, 2020
1 parent b45ccfa commit 99db84c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion routes/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ router.post('/create', recaptchaVerify, (req, res, next) => {
}
const createSchema = {
name: Joi.string().trim().min(1).max(256).label('Your name').required(),
domain: Joi.string().trim().valid(config.service.domains).label('Domain').required(),
domain: Joi.string()
.trim()
.valid(...config.service.domains)
.label('Domain')
.required(),
password: Joi.string().min(8).max(256).label('Password').valid(Joi.ref('password2')).required(),

language: Joi.string().length(2).default('en'),
Expand Down

0 comments on commit 99db84c

Please sign in to comment.