Add utils for invalid chars check in name & cap first letter
This commit is contained in:
@@ -1566,4 +1566,23 @@ function generateRandomPhoneNumber() {
|
|||||||
return getRandom(100000,999999);
|
return getRandom(100000,999999);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
|
|
||||||
|
function doesNameContainInvalidCharacters(name) {
|
||||||
|
for(let i = 0; i < name.length; i++) {
|
||||||
|
let strChar = totalCharacterCount.charAt(i);
|
||||||
|
if(getGlobalConfig().subAccountNameAllowedCharacters.indexOf(strChar) != -1) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
|
|
||||||
|
function fixCharacterName(name) {
|
||||||
|
return String(name.charAt(0).toUpperCase()) + String(name.slice(1));
|
||||||
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
Reference in New Issue
Block a user