Thanks I've managed to get this working by amending the following
/CMSAdminControls/UI/ChangePassword.ascx.cs
/CMSSiteManager/Administration/Users/User_Edit_Password.aspx.cs
/CMSSiteManager/Administration/Users/User_New.aspx.cs
I added this function to each
private bool HasPassedPolicy(string pPassword)
{
// At least 6 characters and at least one letter and number
Regex passwordPattern = new Regex("(?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{6,20})$");
return passwordPattern.IsMatch(pPassword);
}
Then added to btnOK_Click in each something like
if (HasPassedPolicy(txtPassword1.Text))
{
UserInfoProvider.SetPassword(ui.UserName, txtPassword1.Text);
lblInfo.Text = ResHelper.GetString("General.ChangesSaved");
}
else
{
// Not passed policy
lblError.Text = ResHelper.GetString("Administration-User_Edit_Password.PasswordsNotPassedPolicy");
}
You will have to slightly change the placement of the condition in each file