Skip to content

Commit

Permalink
Merge branch 'board-name-length' into 'master'
Browse files Browse the repository at this point in the history
Fix board name length bug

Closes #68

See merge request it1901/groups-2022/gr2205/gr2205!135
  • Loading branch information
mattiastofte committed Nov 22, 2022
2 parents 65e64b4 + c84254b commit 054d034
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion script/ui/src/main/java/ui/ScriptController.java
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ private void updateScreen() {

private Boolean checkBoardName(String text) {
return !(text.isBlank() || user.getBoards().stream().map(board -> (board.getName()))
.collect(Collectors.toList()).contains(text) || !Pattern.matches("^[A-Za-z0-9_.]+$", text));
.collect(Collectors.toList()).contains(text) || !Pattern.matches("^[A-Za-z0-9_.]+$", text)
|| text.length() > Board.MAX_TITLE_LENGHT);
}

public void drawBoardElementControllers() {
Expand Down

0 comments on commit 054d034

Please sign in to comment.