Skip to content

Commit

Permalink
fix: ParliamentaryTable 이름 공백은 띄어쓰기만 허용
Browse files Browse the repository at this point in the history
  • Loading branch information
leegwichan committed Dec 25, 2024
1 parent 16a32cb commit 490b4b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class ParliamentaryTable {

private static final String NAME_REGEX = "^[a-zA-Z가-힣\\s]+$";
private static final String NAME_REGEX = "^[a-zA-Z가-힣 ]+$";
public static final int NAME_MAX_LENGTH = 20;

@Id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Validate {
}

@ParameterizedTest
@ValueSource(strings = {"abc12", "가나다12"})
@ValueSource(strings = {"abc12", "가나다12", "abc\tde"})
void 허용된_글자_이외의_문자는_불가능하다(String name) {
Member member = new Member("member");
assertThatThrownBy(() -> new ParliamentaryTable(member, name, "agenda", 10))
Expand Down

0 comments on commit 490b4b6

Please sign in to comment.