We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Nickname을 UiModel로 바꾸면서, nickname 포맷 비즈니스 오류에 대해 exception을 던질 수 있게 됐습니다. 후순위로 고려되어도 좋습니다. 추후 수정할 기록용으로 이슈로 남겨 놓습니다.
@JvmInline value class Nickname private constructor(val value: String) { init { check(verifyNickname(value)) { NICKNAME_FORMAT_ERROR } } companion object { private const val NICKNAME_REGEX_PATTERN = "[a-zA-Z0-9가-힣]{2,10}" private const val NICKNAME_FORMAT_ERROR = "닉네임 형식이 잘못 되었습니다." fun create(value: String): Nickname = Nickname(value) fun verifyNickname(nickname: String): Boolean { val regex = Regex(NICKNAME_REGEX_PATTERN) return regex.matches(nickname) } } }
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
기능 설명
Nickname을 UiModel로 바꾸면서, nickname 포맷 비즈니스 오류에 대해 exception을 던질 수 있게 됐습니다.
후순위로 고려되어도 좋습니다. 추후 수정할 기록용으로 이슈로 남겨 놓습니다.
개발 일정
No response
자식 이슈
No response
부가 설명
No response
The text was updated successfully, but these errors were encountered: