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

#133 [fix] 닉네임 숫자 방지 및 10글자 경고문 #140

Merged
merged 4 commits into from
Jan 31, 2024

Conversation

stellar-halo
Copy link
Contributor

📑 Work Description

  • 닉네임 숫자 입력 시 경고문 뜨게 했습니다
  • 이전에 두 번 지워야 10글자 경고문이 사라지던 문제 수정했습니다!

🛠️ Issue

📷 Screenshot

record_nickname.mp4

💬 To Reviewers

생각보다 짜치는 처리였달까.. filter가 너무 많아요! ㅠ

@stellar-halo stellar-halo added Pull Request pr 날림! 강희🐬 강희가 작업함! fix Fix(디자인 등) labels Jan 28, 2024
@stellar-halo stellar-halo self-assigned this Jan 28, 2024
Copy link
Collaborator

@pump9918 pump9918 left a comment

Choose a reason for hiding this comment

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

세세하게 함수화하는 습관 배워가겠습니다..

private const val MAXIMUM_LENGTH = 10
private const val NICKNAME_PATTERN =
"^[ㄱ-ㅣ가-힣a-zA-Z\\u318D\\u119E\\u11A2\\u2022\\u2025\\u00B7\\uFE550-9]{1,10}\$"
"^[ㄱ-ㅣ가-힣a-zA-Z\\u318D\\u119E\\u11A2\\u2022\\u2025\\u00B7]{1,10}\$"
Copy link
Collaborator

Choose a reason for hiding this comment

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

이런 정규표현식은 보통 어디에서 구하시나요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

구글링과 지선생 씁니다ㅎㅎ

}

private fun handleInvalidInput(source: CharSequence) =
Copy link
Collaborator

Choose a reason for hiding this comment

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

기능별로 함수화가 세세하게 되어있네요!

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

@minemi00 minemi00 left a comment

Choose a reason for hiding this comment

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

자잘자잘 qa가 생각보다 많네요 .. 수고하셨습니다!

}

private fun handleInvalidInput(source: CharSequence) =
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

@emjayMJkim emjayMJkim left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!!!

Comment on lines +58 to +61
private fun clearWarningFlags() {
setInvalidInputWarning(false)
setLengthExceedWarning(false)
}
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 Author

@stellar-halo stellar-halo Jan 31, 2024

Choose a reason for hiding this comment

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

경고문을 띄우지 않는 경우에는 false로 설정해줘야 안 뜨기 때문입니다!!

Copy link
Member

Choose a reason for hiding this comment

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

아아 초기화를 여기서 하셨네요!!

_isWarning.value =
(_isSpecialCharacterEntered.value == true) || (_isLengthExceed.value == true)
(isInvalidInput.value == true) || (isLengthExceed.value == true)
Copy link
Member

Choose a reason for hiding this comment

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

정규식에서 글자 길이도 제한을 뒀는데 isLengthExceed를 따로 설정하는 이유가 있을까요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

그게 안먹어서요,, 저도 이유는 모르겠습니다 ^-ㅜ

Copy link
Member

Choose a reason for hiding this comment

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

흐음... 왜지...

@stellar-halo stellar-halo merged commit 97e1c18 into develop Jan 31, 2024
1 check passed
@stellar-halo stellar-halo deleted the feature/#133-fix-nickname-number-prevention branch January 31, 2024 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fix(디자인 등) Pull Request pr 날림! 강희🐬 강희가 작업함!
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[fix] 닉네임 숫자 입력 방지
4 participants