Added a method to get the maximum size allowed for user/ group names

This commit is contained in:
delvh 2020-06-27 17:36:03 +02:00
parent 1b71795171
commit 070bfabfd6

View File

@ -29,4 +29,12 @@ public class Bounds {
* @since Envoy Common v0.1-beta
*/
public static boolean isValidContactName(String contactName) { return CONTACT_NAME_PATTERN.matcher(contactName).matches(); }
/**
* @return the maximum size allowed for a user/ group name.
* @apiNote has to be updated manually if {@link Bounds#CONTACT_NAME_PATTERN}
* gets updated.
* @since Envoy Common v0.1-beta
*/
public static int maximumUsernameSize() { return 16; }
}