|
@@ -210,6 +210,13 @@ class KMSignUpViewModel: ObservableObject {
|
|
callback?(nil)
|
|
callback?(nil)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ if email.isEmpty {
|
|
|
|
+ emailErrorMessage = NSLocalizedString("Please enter email address", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
|
+
|
|
|
|
+ callback?(nil)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
if email.count <= 0 || email.count > 100 || !isValidEmail() {
|
|
if email.count <= 0 || email.count > 100 || !isValidEmail() {
|
|
emailErrorMessage = NSLocalizedString("Email format error. Please enter the correct email.", tableName: "MemberCenterLocalizable", comment: "")
|
|
emailErrorMessage = NSLocalizedString("Email format error. Please enter the correct email.", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
|
|
|
@@ -219,6 +226,13 @@ class KMSignUpViewModel: ObservableObject {
|
|
|
|
|
|
var code: String = ""
|
|
var code: String = ""
|
|
if signUpState == .verificationCode {
|
|
if signUpState == .verificationCode {
|
|
|
|
+ if verificationCode.isEmpty {
|
|
|
|
+ passwordErrorMessage = NSLocalizedString("Please enter code", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
|
+
|
|
|
|
+ callback?(nil)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
if verificationCode.count <= 0 || verificationCode.count > 6 || !isValidVerificationCode() {
|
|
if verificationCode.count <= 0 || verificationCode.count > 6 || !isValidVerificationCode() {
|
|
passwordErrorMessage = NSLocalizedString("Verification code error.", tableName: "MemberCenterLocalizable", comment: "")
|
|
passwordErrorMessage = NSLocalizedString("Verification code error.", tableName: "MemberCenterLocalizable", comment: "")
|
|
|
|
|