Skip to content

Commit

Permalink
Client: Convert UsernameValidator line separators from CRLF to LF
Browse files Browse the repository at this point in the history
All other files in the client project use LF line endings.
Done with `find client -type f | xargs dos2unix`
  • Loading branch information
StenAL committed May 31, 2024
1 parent 055acc9 commit 2ebcf63
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions client/src/main/java/com/aapeli/multiuser/UsernameValidator.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.aapeli.multiuser;

import java.util.regex.Pattern;

public class UsernameValidator {
public static Pattern INVALID_VALID_USERNAME_PATTERN = Pattern.compile("[^a-zA-Z0-9 ]");

public static boolean isValidUsername(String username) {
boolean invalid = INVALID_VALID_USERNAME_PATTERN.matcher(username).find() || username.trim().isEmpty();
return !invalid;

}
}
package com.aapeli.multiuser;

import java.util.regex.Pattern;

public class UsernameValidator {
public static Pattern INVALID_VALID_USERNAME_PATTERN = Pattern.compile("[^a-zA-Z0-9 ]");

public static boolean isValidUsername(String username) {
boolean invalid = INVALID_VALID_USERNAME_PATTERN.matcher(username).find() || username.trim().isEmpty();
return !invalid;

}
}

0 comments on commit 2ebcf63

Please sign in to comment.