Skip to content

Commit 1086e52

Browse files
committed
πŸ”§ [chore] κ°œμΈμ •λ³΄μ„€μ • 검증 둜직 μˆ˜μ •
1 parent 8d39bf6 commit 1086e52

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

β€ŽFitfty/Projects/Setting/Sources/PersonalInfo/ViewModel/PersonalInfoViewModel.swiftβ€Ž

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private extension PersonalInfoViewModel {
134134
}
135135

136136
func checkAvailableNickname(_ nickname: String?) {
137-
self.userPrivacy.nickname = nickname
137+
userPrivacy.nickname = nickname
138138
let regex = "^[0-9a-zA-Z._]{1,30}$"
139139
if nickname?.range(of: regex, options: .regularExpression) != nil {
140140
hasAvailableNickname = true
@@ -144,7 +144,13 @@ private extension PersonalInfoViewModel {
144144
}
145145

146146
func checkAvailableBirthday(_ birthday: String?) {
147-
self.userPrivacy.birtyday = birthday
147+
if birthday?.isEmpty == true {
148+
userPrivacy.birtyday = nil
149+
hasAvailableBirthday = true
150+
return
151+
}
152+
153+
userPrivacy.birtyday = birthday
148154
let regex = "^[0-9]{6}$"
149155
if birthday?.range(of: regex, options: .regularExpression) != nil {
150156
hasAvailableBirthday = true

0 commit comments

Comments
Β (0)