Skip to content

Commit c3def79

Browse files
authored
Update Membership.xml (dotnet#9491)
1 parent b09228a commit c3def79

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

xml/System.Web.Security/Membership.xml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,11 +1699,15 @@
16991699
## Examples
17001700
The following code example shows the [membership](https://docs.microsoft.com/previous-versions/dotnet/netframework-4.0/1b9hw62f(v%3dvs.100)) configuration element in the `system.web` section of the application's Web.config file. It specifies that the application use an instance of the <xref:System.Web.Security.SqlMembershipProvider> class to provide membership services, and sets the `passwordStrengthRegularExpression` attribute to a regular expression that validates the password meets the following criteria:
17011701
1702-
- Is greater than seven characters.
1702+
- Is at least six characters long.
17031703
1704-
- Contains at least one digit.
1704+
- Contains at least one digit.
17051705
1706-
- Contains at least one special (non-alphanumeric) character.
1706+
- Contains at least one special (non-alphanumeric) character.
1707+
1708+
- Contains at least one lowercase letter.
1709+
1710+
- Contains at least one uppercase letter.
17071711
17081712
If the password does not meet these criteria, the password is not accepted by the membership provider.
17091713
@@ -1716,7 +1720,7 @@
17161720
type="System.Web.Security.SqlMembershipProvider"
17171721
connectionStringName="SqlServices"
17181722
requiresQuestionAndAnswer="true"
1719-
passwordStrengthRegularExpression=" @\"(?=.{6,})(?=(.*\d){1,})(?=(.*\W){1,})"
1723+
passwordStrengthRegularExpression="(?=.{6,})(?=(.*\d){1,})(?=(.*\W){1,})(?=.*[a-z])(?=.*[A-Z])"
17201724
/>
17211725
</providers>
17221726
</membership>

0 commit comments

Comments
 (0)