     private func join() {
         Tracker.sharedTracker.tappedJoin()
 
-        if allFieldsValid() {
+        let email = emailField.text
+        let username = usernameField.text
+        let password = passwordField.text
+
+        if allFieldsValid(email: email, username: username, password: password) {
             hideErrorLabel()
             hideMessageLabel()
 

// MARK: Text field validation
extension JoinViewController {

    private func allFieldsValid() -> Bool {
        return validateEmail(emailField.text) && validateUsername(usernameField.text) && validatePassword(passwordField.text)
    }

    private func extraHeight() -> CGFloat {

            emailField.resignFirstResponder()
            usernameField.resignFirstResponder()
            passwordField.resignFirstResponder()

            let joinAborted: () -> Void = {
                self.view.userInteractionEnabled = true
