Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
🐛 Fix validation bug with name in registration
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Jun 1, 2019
1 parent 207c662 commit 6bb5722
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/controllers/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,9 @@ export class AuthController {
{
email: Joi.string()
.email()
.required(),
name: Joi.string()
.min(3)
.required()
},
{ email, name }
{ email }
);
const user = req.body;
delete user.organizationId;
Expand All @@ -52,6 +49,9 @@ export class AuthController {
delete user.membershipRole;
joiValidate(
{
name: Joi.string()
.min(3)
.required(),
nickname: Joi.string().min(3),
countryCode: Joi.string().length(2),
password: Joi.string().min(6),
Expand Down

0 comments on commit 6bb5722

Please sign in to comment.