Answers.Body: <p>I just tested this with the user registration for in your link and got the expected behavior when you try to register with a username that already exists.</p>
  
  <p><a href="https://i.sstatic.net/rwBxX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/rwBxX.png" alt="enter image description here"></a></p>
  
  <p>A few things to check.</p>
  
  <ol>
  <li><p>Make sure you have public registration enabled in the Control Panel under Settings->Users->Settings.</p></li>
  <li><p>When you're testing registering a user in your front-end form, make sure you're logged out of your current user account.</p></li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-18T14:34:01.243Z
Answers.Text: The problem is that it doesn't work on a module route, it seems to work fine on my homepage.  
  I'm able to access the error with:
      {% if craft.app.session.has('error') %}
          <ul class="form__errors-list spacer spacer--xsm">
              <li>{{ craft.app.session.get('error') }}</li>
          </ul>
      {% endif %}
  But then I don't have the loginName, rememberMe and errorCode. Any idea what I need to do to just use the docs example and make the magic work?
Answers.UserDisplayName: wietse
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-06T23:03:19.243Z
Answers.LastActivityDate: 2018-09-06T23:03:19.243Z
Answers.UserDisplayName: Brad Bell
Body: <p>I'm trying to get some feedback for the user on registration when the username already exists but I don't know in which object the errors are.</p>
  
  <p>I use the form they provide in the docs:
  <a href="https://docs.craftcms.com/v3/dev/examples/user-registration-form.html" rel="nofollow noreferrer">https://docs.craftcms.com/v3/dev/examples/user-registration-form.html</a></p>
  
  <p>Same for the forgot password form if the user doesn't exists in the system, I'm not able the provide the right feedback with this form:
  <a href="https://docs.craftcms.com/v3/dev/examples/forgot-password-form.html" rel="nofollow noreferrer">https://docs.craftcms.com/v3/dev/examples/forgot-password-form.html</a></p>
  
Tags: <craft3><users>
Title: Displaying errors on frontend user forms
ThreadText: # Displaying errors on frontend user forms
  
  (Asked by: username_0 on 2018-09-03)
  
  I'm trying to get some feedback for the user on registration when the username already exists but I don't know in which object the errors are.
  
  I use the form they provide in the docs:
  <https://docs.craftcms.com/v3/dev/examples/user-registration-form.html>
  
  Same for the forgot password form if the user doesn't exists in the system, I'm not able the provide the right feedback with this form:
  <https://docs.craftcms.com/v3/dev/examples/forgot-password-form.html>
  
  **Tags:** craft3, users
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-09-06. Score: 0
  
  I just tested this with the user registration for in your link and got the expected behavior when you try to register with a username that already exists.
  
  [![enter image description here](https://i.sstatic.net/rwBxX.png)](https://i.sstatic.net/rwBxX.png)
  
  A few things to check.
  
  1. Make sure you have public registration enabled in the Control Panel under Settings->Users->Settings.
  2. When you're testing registering a user in your front-end form, make sure you're logged out of your current user account.
  
  > **Comments:**
  > **username_0**: The problem is that it doesn't work on a module route, it seems to work fine on my homepage.   I'm able to access the error with:     {% if craft.app.session.has('error') %}         <ul class="form__errors-list spacer spacer--xsm">             <li>{{ craft.app.session.get('error') }}</li>         </ul>     {% endif %} But then I don't have the loginName, rememberMe and errorCode. Any idea what I need to do to just use the docs example and make the magic work?  
  
  ---
  
  