Commit b8b15a2a authored by Steven杜宇's avatar Steven杜宇

// 确认

parent 2a7cfc8d
......@@ -59,8 +59,8 @@ class YHResignCertificateDetailViewModel: YHBaseViewModel {
let item5 = YHItemModel(id: .id36, isNeed: true, title: "证件号码", isUserKeyBoard: true, prompts: "请输入", message: dataModel.cert_info.number, isShowPrompts: isShowPrompt, alertMessage:"请输入证件号码")
let item6 = YHItemModel(id: .id37, isNeed: true, title: "签发地", isUserKeyBoard: true, prompts: "请输入", message: dataModel.cert_info.address, isShowPrompts: isShowPrompt, alertMessage:"请输入签发地")
let item1 = YHItemModel(id: .id1, isNeed: true, title: "签发时间", isUserKeyBoard: false, prompts: "请选择", message: getResultString(dataModel.cert_info.issue_start), type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择开始时间")
let item2 = YHItemModel(id: .id2, isNeed: true, title: "届满时间", isUserKeyBoard: false, prompts: "请选择", message: getResultString(dataModel.cert_info.issue_end), type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择到期时间")
let item1 = YHItemModel(id: .id1, isNeed: true, title: "签发日期", isUserKeyBoard: false, prompts: "请选择", message: getResultString(dataModel.cert_info.issue_start), type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择开始时间")
let item2 = YHItemModel(id: .id2, isNeed: true, title: "届满日期", isUserKeyBoard: false, prompts: "请选择", message: getResultString(dataModel.cert_info.issue_end), type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择到期时间")
let item3 = YHItemModel(id: .id3, isNeed: true, title: "开始时间", isUserKeyBoard: false, prompts: "请选择", message: getResultString(dataModel.cert_info.validate_start), type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择开始时间")
let item4 = YHItemModel(id: .id4, isNeed: true, title: "到期时间", isUserKeyBoard: false, prompts: "请选择", message: getResultString(dataModel.cert_info.validate_end), type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择到期时间")
return [item5, item6, item1, item2, item3, item4]
......
......@@ -326,9 +326,9 @@ extension YHResignInfoItemView: UITextFieldDelegate {
}
}
if self.item.id == .hongkongAddress { // 职业
if newText.count > 30 { // 上限30个字符
newText = String(newText.prefix(30))
if self.item.id == .hongkongAddress { // 香港住址
if newText.count > 200 { // 上限30个字符
newText = String(newText.prefix(200))
textField.text = newText
textFieldChanged(textField: textField)
return false
......
......@@ -614,6 +614,10 @@ extension YHItemView: UITextFieldDelegate {
return false
}
if (dataSource?.id == .id36 || dataSource?.id == .id37) && newText.count > 30 {
return false
}
if dataSource?.id == .id23 {
let regex = "[^A-Za-z]+"
textField.limitInputWithPattern(pattern:regex, 30)
......
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