fix/password
This commit is contained in:
2 files changed
+5
-5
No files matched your search
@@ -28,7 +28,7 @@ module.exports = (users) => {
|
||||
|
||||
const credentialSchema = joi.object({
|
||||
email: joi.string().email({ minDomainSegments: 2, tlds: { allow: true } }).required(),
|
||||
password: joi.string().alphanum().max(20).required(),
|
||||
password: joi.string().max(20).required(),
|
||||
});
|
||||
|
||||
const valid = credentialSchema.validate(req.body);
|
||||
@@ -74,8 +74,8 @@ module.exports = (users) => {
|
||||
const userSchema = joi.object({
|
||||
email: joi.string().email({ minDomainSegments: 2, tlds: { allow: true } }).required(),
|
||||
name: joi.string().pattern(new RegExp('^[a-zA-Z]+$')).max(20).required(),
|
||||
password: joi.string().alphanum().max(20).min(8).required(),
|
||||
repassword: joi.string().alphanum().max(20).min(8).required(),
|
||||
password: joi.string().max(20).min(8).required(),
|
||||
repassword: joi.string().max(20).min(8).required(),
|
||||
});
|
||||
|
||||
const valid = userSchema.validate(req.body);
|
||||
|
||||
+2
-2
@@ -451,8 +451,8 @@ module.exports = (middleware, users, plans, assets) => {
|
||||
const accountSchema = joi.object({
|
||||
email: joi.string().email({ minDomainSegments: 2, tlds: { allow: true } }),
|
||||
name: joi.string().pattern(new RegExp('^[a-zA-Z]+$')).max(20),
|
||||
password: joi.string().alphanum().max(20).min(8),
|
||||
repassword: joi.string().alphanum().max(20).min(8),
|
||||
password: joi.string().max(20).min(8),
|
||||
repassword: joi.string().max(20).min(8),
|
||||
});
|
||||
|
||||
const valid = accountSchema.validate(req.body);
|
||||
|
||||
Reference in new issue
Block a user