Answers.Body: <p>This is something you should let JavaScript take care of. Craft does not check a 'second' email or password field, so you should make sure the two field values are identical before posting the values to Craft's controller.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-11T14:19:08.303Z
Answers.LastActivityDate: 2014-09-11T14:19:08.303Z
Answers.UserDisplayName: Paul
Answers.Body: <p>If anyone is interested in confirming passwords still, I have wrote a plugin which does just this, it doesn't rely on it's own controller either so there is no bypassing of Crafts own workings :)</p>
  
  <p><a href="https://github.com/alecritson/Craft-Password-Confirm">https://github.com/alecritson/Craft-Password-Confirm</a></p>
  
  <p>All you need to do is add a <code>passwordConfirm</code> field to your existing form:</p>
  
  <pre><code>&lt;input type="password" name="passwordConfirm"&gt;
  {% if account is defined %}
    {{ account.getErrors('passwordConfirm') }}
  {% endif %}
  </code></pre>
  
  <p>It doesn't confirm emails though..sorry</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-09T18:21:06.163Z
Answers.Text: This is great, and can easily be modified to support confirm email as well!
Answers.UserDisplayName: Rick Kukiela
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-17T10:45:18.263Z
Answers.LastActivityDate: 2016-03-17T10:45:18.263Z
Answers.UserDisplayName: Alec Ritson
Answers.Body: <p>In addition to <a href="https://craftcms.stackexchange.com/a/2483/57">letting JavaScript</a> take care of the extra front-end logic, you could also write a <a href="http://buildwithcraft.com/docs/plugins/introduction" rel="nofollow noreferrer">plugin</a> that exposes a <a href="http://buildwithcraft.com/docs/plugins/controllers" rel="nofollow noreferrer">controller</a> that does the extra email and password sameness checks from PHP.</p>
  
  <p>If those are equal, then it would just pass the data off to <code>craft()-&gt;users-&gt;saveUser()</code>, otherwise, return any validation errors back to the template.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-12T15:24:50.987Z
Answers.Text: Thanks Brad - will bear that in mind for the future if I ever manage to get my head around OO PHP :)
Answers.UserDisplayName: darylknight
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-11T15:45:23.450Z
Answers.LastActivityDate: 2014-09-11T15:45:23.450Z
Answers.LastEditDate: 2017-04-13T12:50:59.930Z
Answers.UserDisplayName: Brad Bell
Body: <p>I've got a user registration form on my site, using the code from Craft's documentation. How can I get the form working so it asks the user to enter their email address and password twice? Can Craft take care of that or do I need to use client-side JS validation?</p>
  
Tags: <form><registration>
Title: User registration: How do implement "Confirm password" and "Confirm email"?
ThreadText: # User registration: How do implement "Confirm password" and "Confirm email"?
  
  (Asked by: username_0 on 2014-09-11)
  
  I've got a user registration form on my site, using the code from Craft's documentation. How can I get the form working so it asks the user to enter their email address and password twice? Can Craft take care of that or do I need to use client-side JS validation?
  
  **Tags:** form, registration
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2014-09-11. Score: 3 | Accepted answer
  
  This is something you should let JavaScript take care of. Craft does not check a 'second' email or password field, so you should make sure the two field values are identical before posting the values to Craft's controller.
  
  
  ---
  
  ### Answer by username_2 on 2016-03-17. Score: 11
  
  If anyone is interested in confirming passwords still, I have wrote a plugin which does just this, it doesn't rely on it's own controller either so there is no bypassing of Crafts own workings :)
  
  <https://github.com/username_2/Craft-Password-Confirm>
  
  All you need to do is add a `passwordConfirm` field to your existing form:
  
  ```
  <input type="password" name="passwordConfirm">
  {% if account is defined %}
    {{ account.getErrors('passwordConfirm') }}
  {% endif %}
  
  ```
  
  It doesn't confirm emails though..sorry
  
  > **Comments:**
  > **username_3**: This is great, and can easily be modified to support confirm email as well!  
  
  ---
  
  ### Answer by username_4 on 2014-09-11. Score: 4
  
  In addition to [letting JavaScript](https://craftcms.stackexchange.com/a/2483/57) take care of the extra front-end logic, you could also write a [plugin](http://buildwithcraft.com/docs/plugins/introduction) that exposes a [controller](http://buildwithcraft.com/docs/plugins/controllers) that does the extra email and password sameness checks from PHP.
  
  If those are equal, then it would just pass the data off to `craft()->users->saveUser()`, otherwise, return any validation errors back to the template.
  
  > **Comments:**
  > **username_0**: Thanks username_4 - will bear that in mind for the future if I ever manage to get my head around OO PHP :)  
  
  ---
  
  