 		let valid = validateAndUpdateErrorIfNeeded(s, shouldInstallTimer: true, checkSubmitRule: false)
 		return valid
 	}
-	
-	public func timerUpdate() {
-		invalidateTimer()
-		//SwiftyFormLog("timer update")
-
+
+	// Hide the keyboard when the user taps the return key in this UITextField
+	public func textFieldShouldReturn(_ textField: UITextField) -> Bool {
 		let s = textField.text ?? ""
-		_ = validateAndUpdateErrorIfNeeded(s, shouldInstallTimer: false, checkSubmitRule: false)
-	}
-
-	public func reloadPersistentValidationState() {
-		invalidateTimer()
-		//SwiftyFormLog("reload persistent message")
-
-		let s = textField.text ?? ""
-		_ = validateAndUpdateErrorIfNeeded(s, shouldInstallTimer: false, checkSubmitRule: true)
-	}
-
+		let isTextValid = validateAndUpdateErrorIfNeeded(s, shouldInstallTimer: true, checkSubmitRule: true)
+		if isTextValid {
+			textField.resignFirstResponder()
+		}
+		return false
+	}
+}
+
+extension TextFieldFormItemCell: CellHeightProvider {
 	public func form_cellHeight(indexPath: IndexPath, tableView: UITableView) -> CGFloat {
 		let sizes: TextFieldFormItemCellSizes = compute(bounds.width)
 		let value = sizes.cellHeight
 		//SwiftyFormLog("compute height of row: \(value)")
 		return value
 	}
-	
-	public func textFieldDidBeginEditing(_ textField: UITextField) {
-		updateToolbarButtons()
-	}
-	
-	// MARK: UIResponder
-	
-	public override var canBecomeFirstResponder : Bool {
-		return true
-	}
-	
-	public override func becomeFirstResponder() -> Bool {
-		return textField.becomeFirstResponder()
-	}
-	
-	public override func resignFirstResponder() -> Bool {
-		return textField.resignFirstResponder()
-	}
-	
-}
+}

		SwiftyFormLog("set value \(value)")
		textField.text = value
		_ = validateAndUpdateErrorIfNeeded(value, shouldInstallTimer: false, checkSubmitRule: false)
	}
	

	// Hide the keyboard when the user taps the return key in this UITextField
	public func textFieldShouldReturn(_ textField: UITextField) -> Bool {
		let s = textField.text ?? ""
		let isTextValid = validateAndUpdateErrorIfNeeded(s, shouldInstallTimer: true, checkSubmitRule: true)
		if isTextValid {
			textField.resignFirstResponder()
		}
		return false
	}
	
	public func updateErrorLabel(_ result: ValidateResult) {



public class CustomTextField: UITextField {
	public func configure() {
		backgroundColor = UIColor.white
		autocapitalizationType = .sentences
