views:

31

answers:

1

I have a membership provider in my web.config with the passwordStrengthRegularExpression attribute set. I dropped an asp:CreateUserWizard in a page and tried to create a user with a weak password (ie didn't match the regex in the web.config). The validation fails and displays the message

Password length minimum: 7. Non-alphanumeric characters required: 1.

The message corresponds to the default password strength requirement. I know it's using the value I have set in the web.config to validate against but how do I change/set/override the error message that gets displayed when the validation fails?

+1  A: 

The CreateUserWizard control has a property called PasswordRegularExpressionErrorMessage that you can set.

womp
That only works if I set the PasswordRegularExpression property on the CreateUserWizard control. I was hoping to be able to only have to set the regex at the membership provider and then have it enforced for all create/edit password attempts.
Ax