Browse Source

Fixed issue with password RegEx.

KrisVos130 8 years ago
parent
commit
cef5134512
1 changed files with 1 additions and 1 deletions
  1. 1 1
      backend/logic/db/index.js

+ 1 - 1
backend/logic/db/index.js

@@ -8,7 +8,7 @@ const regex = {
 	azAZ09_: /^[A-Za-z0-9_]+$/,
 	az09_: /^[a-z0-9_]+$/,
 	emailSimple: /^[\x00-\x7F]+@[a-z0-9]+\.[a-z0-9]+(\.[a-z0-9]+)?$/,
-	password: /[a-z]+[A-Z]+[0-9]+[^a-zA-Z0-9]+/,
+	password: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]/,
 	ascii: /^[\x00-\x7F]+$/
 };