Password must be 8 characters long and includes two numbers and two special character
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:changepassword id="ChangePassword2"
runat="server"
PasswordHintText = "Password must be 8 characters long and includes two numbers and two special character."
NewPasswordRegularExpression = '@\"(?=.{8,})(?=(.*\d){2,})(?=(.*\W){2,})'
NewPasswordRegularExpressionErrorMessage= "Error: Your password must be 8 characters long and includes two numbers and two special character"
BorderWidth="1px"
BorderStyle="Solid"
BorderColor="#CCCC99"
Width="500px" >
<TitleTextStyle ForeColor="#FFFFFF" Font-Bold="True" BackColor="#6B696B" />
</asp:changepassword>
<br />
</form>
</body>
</html>
Related examples in the same category