 			}, completion: nil)
 		return true
 	}
+
+	func textFieldShouldClear(textField: UITextField) -> Bool {
+		saveAction.enabled = false
+		return true
+	}
+
+	func textField(textField: UITextField, shouldChangeCharactersInRange range: NSRange, replacementString string: String) -> Bool {
+		guard let addressTextField = textField as? TextField else {
+			return false
+		}
+
+		let text = NSString(string: textField.text!).stringByReplacingCharactersInRange(range, withString: string)
+		if let url = NSURLComponents(string: text) {
+			if (url.scheme != "http" && url.scheme != "https") || url.host == nil || url.host!.isEmpty || url.path != "" {
+				addressTextField.placeholderActiveColor = MaterialColor.red.base
+				addressTextField.dividerActiveColor = MaterialColor.red.base
+				saveAction.enabled = false
+			} else {
+				addressTextField.placeholderActiveColor = MaterialColor.blue.base
+				addressTextField.dividerActiveColor = MaterialColor.blue.base
+				saveAction.enabled = true
+			}
+		} else {
+			addressTextField.placeholderActiveColor = MaterialColor.red.base
+			addressTextField.dividerActiveColor = MaterialColor.red.base
+			saveAction.enabled = false
+		}
+
+
+		return true
+	}
 }

        super.viewDidLoad()

		self.alertView.divider = true

		// Table view
		self.tableView.registerNib(UINib(nibName: "ChinachuWUIListTableViewCell", bundle: nil), forCellReuseIdentifier: "ChinachuWUIListTableViewCell")

	}

	// MARK: - Event handler
	func showManualInput() {
		self.alertView.divider = false
		tableView.hidden = true
		manualInputView.hidden = false
		self.alertView.rightButtons?.append(saveAction)
		self.alertView.leftButtons = []
		self.view.layoutIfNeeded()

		// Change alertView size
		fixedSizeConstraint.constant = 200
		UIView.animateWithDuration(0.2) {
			self.view.layoutIfNeeded()
			self.view.layer.layoutIfNeeded()
		}
	}

