Skip to content

Commit

Permalink
✅[CHORE] 공백인 경우 예외처리 적용(#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
heerucan committed Oct 7, 2021
1 parent 793114c commit 1e6daf3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ class LoginVC: UIViewController {
return
}

if name.isEmpty || email.isEmpty || pw.isEmpty {
if name.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty ||
email.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty ||
pw.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
signInButton.isUserInteractionEnabled = false
signInButton.backgroundColor = .lightGray
print("비활성화")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ class SignUpVC: UIViewController {
return
}

if name.isEmpty || email.isEmpty || pw.isEmpty {
if name.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty ||
email.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty ||
pw.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
signupButton.isUserInteractionEnabled = false
signupButton.backgroundColor = .lightGray
print("비활성화")
Expand Down

0 comments on commit 1e6daf3

Please sign in to comment.