added: _ e - all'username in fase di registrazione

This commit is contained in:
paoloar77
2022-02-14 19:35:11 +01:00
parent c7d52ca531
commit a3502c1d9d
3 changed files with 22 additions and 3 deletions

View File

@@ -2373,6 +2373,23 @@ module.exports = {
}
return true;
},
isAlphaNumericAndSpecialCharacter(str) {
let code, i, len;
for (i = 0, len = str.length; i < len; i++) {
code = str.charCodeAt(i);
if (!(code > 47 && code < 58) && // numeric (0-9)
!(code > 63 && code < 91) && // upper alpha (A-Z) // e @
(code !== 95) && // _
(code !== 45) && // -
!(code > 96 && code < 123)) { // lower alpha (a-z)
return false;
}
}
return true;
},
categorizeQueryString(queryObj) {
let query = {};
let order = {};