Skip to content

Commit

Permalink
[Fix] 닉네임 정규식 수정 - 공백 비허용 (TeamSobokSobok#281 TeamSobokSobok#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
seondal committed Sep 21, 2022
1 parent 9a7f391 commit 11956cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ final class EditNicknameViewController: UIViewController, EditNicknameProtocol {
isNickNameRight = checkNicknameRegularExpression(input: nickNameTextField.text ?? "")
}
private func checkNicknameRegularExpression (input: String) -> Bool {
// 닉네임 조건 : [영문, 한글, 공백, 숫자] 2~10글자
let validNickName = "[가-힣0-9a-zA-Z ]{2,10}"
// 닉네임 조건 : [영문, 한글, 숫자] 2~10글자
let validNickName = "[가-힣0-9a-zA-Z]{2,10}"
let nickNameTest = NSPredicate(format: "SELF MATCHES %@", validNickName)
return nickNameTest.evaluate(with: input)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ final class SetNickNameVIewController: UIViewController, SetNicknameProtocol {
isNickNameRight = checkNicknameRegularExpression(input: nickNameTextField.text ?? "")
}
private func checkNicknameRegularExpression (input: String) -> Bool {
// 닉네임 조건 : [영문, 한글, 공백, 숫자] 2~10글자
let validNickName = "[가-힣0-9a-zA-Z ]{2,10}"
// 닉네임 조건 : [영문, 한글, 숫자] 2~10글자
let validNickName = "[가-힣0-9a-zA-Z]{2,10}"
let nickNameTest = NSPredicate(format: "SELF MATCHES %@", validNickName)
return nickNameTest.evaluate(with: input)
}
Expand Down

0 comments on commit 11956cc

Please sign in to comment.