-
Notifications
You must be signed in to change notification settings - Fork 0
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
#133 [fix] 닉네임 숫자 방지 및 10글자 경고문 #140
Conversation
There was a problem hiding this 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}\$" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이런 정규표현식은 보통 어디에서 구하시나요?
There was a problem hiding this comment.
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) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기능별로 함수화가 세세하게 되어있네요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 함수화를 습관화해보겠어요..!
There was a problem hiding this 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) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 함수화를 습관화해보겠어요..!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다!!!
private fun clearWarningFlags() { | ||
setInvalidInputWarning(false) | ||
setLengthExceedWarning(false) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기서 이 함수를 쓰는 이유가 있을까용..??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
경고문을 띄우지 않는 경우에는 false로 설정해줘야 안 뜨기 때문입니다!!
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
정규식에서 글자 길이도 제한을 뒀는데 isLengthExceed를 따로 설정하는 이유가 있을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
그게 안먹어서요,, 저도 이유는 모르겠습니다 ^-ㅜ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
흐음... 왜지...
📑 Work Description
🛠️ Issue
📷 Screenshot
record_nickname.mp4
💬 To Reviewers
생각보다 짜치는 처리였달까.. filter가 너무 많아요! ㅠ