Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE] 닉네임 검증 정규표현식 삭제 및 앞 뒤 공백 제거 로직 추가 #168

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

koust6u
Copy link
Member

@koust6u koust6u commented Jul 29, 2024

연관된 이슈

구현한 기능

  • 닉네임 검증 정규 표현식 삭제
  • 닉네임 앞뒤 공백 제거

상세 설명

닉네임은 중간 공백은 허용한다는 정책 및 러프하게 이모지, 영어, 숫자는 허용하기 위한 코드 수정입니다.

}

private void validate(final String value) {
if (StringUtils.isBlank(value)) {
throw new InvalidNameFormatException("페어의 이름이 비어있습니다.");
}
if (value.length() > MAX_LENGTH) {
throw new InvalidNameFormatException("이름은 10자 이하여야 합니다.");
throw new InvalidNameFormatException(String.format("이름은 %d자 이하여야 합니다.", MAX_LENGTH));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

공백을 제거한다음 10자인걸 확인해줘야 할거 같아요!

@@ -13,7 +13,7 @@
class PairNameTest {

@ParameterizedTest
@ValueSource(strings = {"레디!", "파슬리 🌿", "ㄹ ㅔ ㅁ ㄴ ㅔ", "lemone"})
@ValueSource(strings = {"레디!", "파슬리 🌿", "여 왕 님", "lemon", "abcdeabcde"})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👸

Copy link
Member

@reddevilmidzy reddevilmidzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +50 to +53
@Test
@DisplayName("공백이 제거 된 후 10 글자 이하 닉네임은 허용한다.")
void allow_10_characters_with_trim_name_length() {
// given
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

테스트 추가 구우웃!!!

Copy link
Contributor

@kelly6bf kelly6bf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🧑‍💻

@@ -13,7 +13,7 @@
class PairNameTest {

@ParameterizedTest
@ValueSource(strings = {"레디!", "파슬리 🌿", "ㄹ ㅔ ㅁ ㄴ ㅔ", "lemone"})
@ValueSource(strings = {"레디!", "파슬리 🌿", "여 왕 님", "lemon", "abcdeabcde"})
@DisplayName("한글, 한글 자음 & 모음, 영어, 기호, 이모지가 들어간 이름을 생성한다.")
void create_name_contains_special_character(String validName) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
void create_name_contains_special_character(String validName) {
void create_name_contains_special_character(final String validName) {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해당 누락 Final 같이 다음 이슈에서 수정 PR하겠습니다.😊`

Copy link
Contributor

@JiHyeonL JiHyeonL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goooood~~~

@koust6u koust6u merged commit 6aae956 into BE/dev Jul 29, 2024
7 checks passed
@koust6u koust6u deleted the BE/feature/#153 branch July 29, 2024 12:05
@koust6u koust6u linked an issue Jul 31, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BE] 닉네임 검증 제거
5 participants