Skip to content

Commit

Permalink
Remove required password pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
gnmyt committed Sep 14, 2024
1 parent 6994f08 commit f339bce
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions server/validations/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ const Joi = require('joi');

module.exports.registerValidation = Joi.object({
username: Joi.string().min(3).max(15).alphanum().required(),
password: Joi.string().min(5).max(150).required()
.pattern(new RegExp('^(?=.*[0-9])(?=.*[^a-zA-Z0-9])')),
password: Joi.string().min(3).max(150).required(),
firstName: Joi.string().min(2).max(50).required(),
lastName: Joi.string().min(2).max(50).required(),
});
Expand All @@ -13,8 +12,7 @@ module.exports.totpSetup = Joi.object({
});

module.exports.passwordChangeValidation = Joi.object({
password: Joi.string().min(5).max(150).required()
.pattern(new RegExp('^(?=.*[0-9])(?=.*[^a-zA-Z0-9])')),
password: Joi.string().min(3).max(150).required(),
});

module.exports.updateNameValidation = Joi.object({
Expand Down

0 comments on commit f339bce

Please sign in to comment.