chore: remove useless code

This commit is contained in:
sunxiaojian 2021-02-20 18:26:39 +08:00
parent 243d3362e6
commit 0e2aa4570d
1 changed files with 0 additions and 23 deletions

View File

@ -425,29 +425,6 @@ extension MastodonRegisterViewController: UITextFieldDelegate {
textField.layer.shadowPath = UIBezierPath(roundedRect: textField.bounds, byRoundingCorners: .allCorners, cornerRadii: CGSize(width: 2.0, height: 2.0)).cgPath
}
func validateTextField(textField: UITextField) -> Bool {
var isvalid = false
if textField == usernameTextField {
isvalid = viewModel.isUsernameValid.value ?? false
}
if textField == displayNameTextField {
isvalid = viewModel.isDisplaynameValid.value ?? false
}
if textField == emailTextField {
isvalid = viewModel.isEmailValid.value ?? false
}
if textField == passwordTextField {
isvalid = viewModel.isPasswordValid.value ?? false
}
if isvalid {
showShadowWithColor(color: Asset.Colors.TextField.successGreen.color, textField: textField)
} else {
textField.shake()
showShadowWithColor(color: Asset.Colors.lightDangerRed.color, textField: textField)
}
return isvalid
}
func validateAllTextField() -> Bool {
return viewModel.isUsernameValid.value ?? false && viewModel.isDisplaynameValid.value ?? false && viewModel.isEmailValid.value ?? false && viewModel.isPasswordValid.value ?? false
}