Moving Fname regex to config

This commit is contained in:
2022-06-06 04:28:44 -04:00
parent ad4678ab3c
commit 24d96f24b2
3 changed files with 12 additions and 1 deletions
+2 -1
View File
@@ -9,6 +9,7 @@
package engine.util;
import engine.gameManager.ConfigManager;
import engine.server.MBServerStatics;
import java.util.regex.Pattern;
@@ -29,7 +30,7 @@ public class MiscUtils {
|| (firstName.length() < MBServerStatics.MIN_NAME_LENGTH)) {
return true;
}
return (!firstNameRegex.matcher(firstName).matches());
return (!ConfigManager.regex.get(ConfigManager.MB_LOGIN_FNAME_REGEX).matcher(firstName).matches());
}
public static boolean checkIfLastNameInvalid(String lastName) {