fix: signup password validation

feat: add search by brands (WIP)
This commit is contained in:
Gérard Le Cloerec
2021-04-09 10:19:47 +02:00
parent 15d740e85f
commit 164db10e08
8 changed files with 81 additions and 70 deletions

View File

@@ -13,7 +13,7 @@ const signup: SignupHandlers['signup'] = async ({
lastName: Joi.string().min(1),
email: Joi.string().email({ tlds: false }),
password: Joi.string().pattern(
new RegExp('^(?=.*d)(?=.*[A-Z])(?=.*[a-z])(?=.*[^wd:])([^s]){6,}$')
new RegExp(/^(?=.*\d)(?=.*[A-Z])(?=.*[a-z])(?=.*[^\d\s:])([^\s]){6,}$/)
),
})