         return false
     }
     
-    func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
-        if(textField == self.emailField) {
-            self.validateEmailTextFieldWithText(email: string)
-        }
-        return true
+    @IBAction func validateEmailField() {
+        validateEmailTextFieldWithText(email: emailField.text)
     }
     
     func validateEmailTextFieldWithText(email: String?) {

    func textFieldShouldReturn(_ textField: UITextField) -> Bool {
        // Validate the email field
        if (textField == self.emailField) {
            self.validateEmailTextFieldWithText(email: textField.text)
        }
        
        // When pressing return, move to the next field

            if(email.characters.count == 0) {
                self.emailField.errorMessage = nil
            }
            else if validateEmail(email) == false {
                self.emailField.errorMessage = NSLocalizedString("Email not valid", tableName: "SkyFloatingLabelTextField", comment: " ")
            } else {
                self.emailField.errorMessage = nil
