Project cleanup pre merge.

This commit is contained in:
2023-07-15 09:23:48 -04:00
parent 134b651df8
commit 9bbdef224d
747 changed files with 99704 additions and 101200 deletions
+17 -17
View File
@@ -15,24 +15,24 @@ import engine.server.MBServerStatics;
public class MiscUtils {
public static boolean checkIfFirstNameInvalid(String firstName) {
if ((firstName == null) || (firstName.length() == 0)
|| (firstName.length() > MBServerStatics.MAX_NAME_LENGTH)
|| (firstName.length() < MBServerStatics.MIN_NAME_LENGTH)) {
return true;
}
return (!ConfigManager.regex.get(ConfigManager.MB_LOGIN_FNAME_REGEX).matcher(firstName).matches());
}
public static boolean checkIfFirstNameInvalid(String firstName) {
if ((firstName == null) || (firstName.length() == 0)
|| (firstName.length() > MBServerStatics.MAX_NAME_LENGTH)
|| (firstName.length() < MBServerStatics.MIN_NAME_LENGTH)) {
return true;
}
return (!ConfigManager.regex.get(ConfigManager.MB_LOGIN_FNAME_REGEX).matcher(firstName).matches());
}
public static boolean checkIfLastNameInvalid(String lastName) {
if ((lastName != null) && (lastName.length() != 0)) {
// make sure it's less than max length
public static boolean checkIfLastNameInvalid(String lastName) {
if ((lastName != null) && (lastName.length() != 0)) {
// make sure it's less than max length
return lastName.length() > MBServerStatics.MAX_NAME_LENGTH;
// first character: A-Z, a-z
// remaining chars (optional): hyphen, apostrophe, A-Z, a-z, space
// first character: A-Z, a-z
// remaining chars (optional): hyphen, apostrophe, A-Z, a-z, space
// return (!lastNameRegex.matcher(lastName).matches());
}
// empty last names are fine, return false
return false;
}
}
// empty last names are fine, return false
return false;
}
}