Merge pull request #1212 from thecodingmachine/noWhitespaces
FIX: no more whitespaces in player names
This commit is contained in:
commit
5f944d8e4a
@ -10,7 +10,7 @@ export interface CharacterTexture {
|
||||
export const maxUserNameLength: number = MAX_USERNAME_LENGTH;
|
||||
|
||||
export function isUserNameValid(value: unknown): boolean {
|
||||
return typeof value === "string" && value.length > 0 && value.length <= maxUserNameLength && value.indexOf(' ') === -1;
|
||||
return typeof value === "string" && value.length > 0 && value.length <= maxUserNameLength && /\S/.test(value);
|
||||
}
|
||||
|
||||
export function areCharacterLayersValid(value: string[] | null): boolean {
|
||||
|
Loading…
Reference in New Issue
Block a user