troygoode / MembershipStarterKit

The starter kit provides the Asp.Net MVC controllers, models, and views needed to administer users & roles.
http://github.com/TroyGoode/MembershipStarterKit
MIT License
198 stars 66 forks source link

Validation of new passwords in UserAdministration #25

Open Thieum opened 12 years ago

Thieum commented 12 years ago

The following code in / Areas / MvcMembership / Views / UserAdministration / Password.cshtml :

  using(Html.BeginForm("SetPassword", "UserAdministration", new{ id = Model.User.ProviderUserKey })){   
  <fieldset>                
    <p>                 
      <label for="password">New Password:</label>                   
      @Html.TextBox("password")             
    </p>                
    <input type="submit" value="Change Password" />         
  </fieldset>           
  }

does not provide any validation for the password as defined in the ChangePasswordModel.

Both should be using a common definition of the validation rules to avoid errors in the user administration part of the website.