PasswordStrengthRegularExpression Property

MySQL Connector/Net

Gets the regular expression used to evaluate a password.

Namespace:  MySql.Web.Security
Assembly:  MySql.Web (in MySql.Web.dll) Version: 6.2.2.0

Syntax

C#
public override string PasswordStrengthRegularExpression { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property PasswordStrengthRegularExpression As String
Visual C++
public:
virtual property String^ PasswordStrengthRegularExpression {
	String^ get () override;
}

Field Value

A regular expression used to evaluate a password.

Examples

The following example shows the membership element being used in an applications web.config file. In this example, the regular expression specifies that the password must meet the following criteria:
    Is at least seven characters. Contains at least one digit. Contains at least one special (non-alphanumeric) character.
CopyC#
<membership defaultProvider="MySQLMembershipProvider">
  <providers>
      <add name="MySqlMembershipProvider"
          type="MySql.Web.Security.MySQLMembershipProvider"
          connectionStringName="LocalMySqlServer"
          enablePasswordRetrieval="true"
          enablePasswordReset="false"
          requiresQuestionAndAnswer="true"
          requiresUniqueEmail="false" 
          passwordFormat="Encrypted"
          maxInvalidPasswordAttempts="3" 
          passwordAttemptWindow="20" 
          minRequiredNonAlphanumericCharacters="1" 
          minRequiredPasswordLength="11" 
          applicationName="MyApplication" />
  </providers>
</membership>

See Also