Skip to content

Commit

Permalink
[14453] Allow digits when setting a userid
Browse files Browse the repository at this point in the history
  • Loading branch information
col-panic committed Sep 11, 2018
1 parent 1480df6 commit 0f1fb94
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -148,10 +148,10 @@ public String isValid(String newText){
if (newText.length() < 3) {
return "Mindestens 3 Zeichen";
}
boolean allLetters =
newText.chars().allMatch(x -> Character.isLetter(x));
if (!allLetters) {
return "Nur Buchstaben erlaubt";
boolean allLettersOrDigits =
newText.chars().allMatch(x -> Character.isLetterOrDigit(x));
if (!allLettersOrDigits) {
return "Nur Buchstaben und Zahlen erlaubt";
}
boolean isFree = User.verifyUsernameNotTaken(newText);
if (!isFree) {
Expand Down

0 comments on commit 0f1fb94

Please sign in to comment.