mirror of
https://github.com/DerTyp7/shop-ejs-expressjs.git
synced 2025-10-29 12:32:11 +01:00
better error handling register
This commit is contained in:
15
validators.js
Normal file
15
validators.js
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
function validate_password(password) {
|
||||
var re = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}$/;
|
||||
|
||||
if(re.test(password)){
|
||||
if(password.length > 8 && password.length < 255){
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
validate_password
|
||||
}
|
||||
Reference in New Issue
Block a user