<%@ Import Namespace="Toolkit.Web.Mvc" %>
<%@ Import Namespace="Toolkit.Security" %>
<script src="/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script src="/Scripts/jquery.validate.js" type="text/javascript"></script>
<% PasswordStrength Strength = new PasswordStrength{
StrengthCategories="weak,medium,strong", StrengthColours="red,magenta,green",
MinPasswordLengthStrength="5,8,11",
MinNoOfLowerCaseCharsStrength="3,5,7", MinNoOfUpperCaseCharsStrength="2,3,4",
MaxNoOfAllowedRepetitionsStrength="3,2,1" };
%>
<% PasswordPolicy Policy = new PasswordPolicy {
MinPasswordLength = 5,
MinNoOfLowerCaseChars = 3,
MinNoOfUpperCaseChars = 2,
MaxNoOfAllowedRepetitions=3 };
%>
<%= Html.TextBoxFor(m => m.UserName) %>
<%= Html.PasswordFor(m => m.Password)%>
<%= Html.ValidationMessageFor(m => m.Password) %>
<%= Html.PasswordPolicyValidatorFor(m => m.Password, Policy, "UserName", Strength, "../../Scripts/PasswordPolicyValidator.js", "* Password policy did not match!")%>
|