title: How can you test if an ASP.NET membership password will meet configured complexity requirements?
body: <p>I have a ASP.NET page which allows an administrator to change the password for a user.  Since the administrator does not know the user's password, I am using the following:</p>
  
  <pre><code>MembershipUser member = Membership.GetUser(_usernameTextBox.Text);
  member.ChangePassword(member.ResetPassword(), _passNewTextBox.Text);
  </code></pre>
  
  <p>-- as described by this <a href="https://stackoverflow.com/questions/287320/how-do-you-change-a-hashed-password-using-aspnet-membership-provider-if-you-don">SO question</a>.  </p>
  
  <p>If the new password does not meet the complexity requirements which are configured in the web.config file, then the password will have been reset, but not changed to the desired one.  If the new password does not meet complexity requirements, then the password should not change at all.</p>
  
  <p>Is there an easy way to test the new password against the complexity requirements?</p>