title: Validate/Change Password via REST API
body: <p>I want to change a user password via a REST API. This is not a forgotten or reset password function, but a logged in user wanting to change their password.</p>
  
  <p>The form requires the current password, the new password, and a confirmation for the new password. However, I want to validate each form field as the user fills it out. This is trivial for <code>newPassword</code> and <code>confirmNewPassword</code> (client side), but not for <code>currentPassword</code>. Currently performing update to the User object via <code>PUT /users/:id</code>. If a password parameter is passed, I check for the <code>currentPassword</code> parameter and ensure it is correct prior to saving. However, for validation, I'm unsure of the best approach.</p>
  
  <p>I also have a <code>POST /users/validate</code> - not sure if this is best either. This validates a User object for both create and update, but only validates fields that belong to the User object (<code>email</code>, <code>username</code>, <code>password</code>). <code>currentPassword</code> isn't one of these. Wondering how to handle this. Some things I've considered:</p>
  
  <p><code>POST /users/check_password</code>,
  <code>POST /users/validate</code> (adding in validation for currentPassword if that parameter is passed, and check that currentPassword matches the users existing password) and
  <code>POST /users/:id/validate</code> (separate validation for existing user, requiring <code>currentPassword</code>).</p>
  
  <p>Any thoughts or advice would be greatly appreciated. My first application that only exposes functionality via REST API.</p>