This is my jquery to get data,
var passwordReset = {
UserName: $("#txtLgnUsername").val(),
Password: $("#hdnOldPassword").val(),
NewPassword: $("#txtLgnPasswordReset").val()
}
I don't want person to enter his userName as password, so I used this in next line
if (passwordReset.NewPassword.contains(passwordReset.UserName)) {
alert(passwordReset.NewPassword);
notifyMessage.showNotifyMessage('error', 'User name cannot be part of password.Please try a different password.', false);
}
Which isn't helping...How do i check if my password has userName?? Thanks in advance...