File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Fitfty/Projects/Setting/Sources/PersonalInfo/ViewModel Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff 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
You canβt perform that action at this time.
0 commit comments