Commit c6e327b8 authored by David黄金龙's avatar David黄金龙

处理 一处刷新

parent 7109ed99
......@@ -586,12 +586,13 @@ extension YHApplyActivityAlert: UITextFieldDelegate {
let newText = (textField.text! as NSString).replacingCharacters(in: range, with: string)
if textField == nameTextField {
if newText.count > 20 {
updateButtonUI()
return false
}
} else if textField == applyNumberTextField {
if !string.isNumeric {
YHHUD.flash(message: "请输入数字")
updateButtonUI()
return false
}
......@@ -599,16 +600,20 @@ extension YHApplyActivityAlert: UITextFieldDelegate {
if let item = Int(newText),item > 10 {
textField.text = "10"
YHHUD.flash(message: "最多添加10人")
updateButtonUI()
return false
} else if let item = Int(newText),item < 1 {
textField.text = "1"
YHHUD.flash(message: "至少添加1人")
updateButtonUI()
return false
}
} else if textField == phoneTextField {
if newText.count > 20 {
updateButtonUI()
return false
}
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment