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

        }
    }
    
    func isValidEmail(str:String?) -> Bool {
        let emailRegEx = "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$"
        
        let emailTest = NSPredicate(format:"SELF MATCHES %@", emailRegEx)
        return emailTest.evaluate(with: str)
    }
}

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