bootstrap-application-wizard
bootstrap-application-wizard copied to clipboard
errorPopover not updating message
Error message is not updating when it is set the first time. The message Enter Password shows. Then I enter text which should trigger the Not strong enough. text but Enter Password still shows instead
function validatePasswordLabel(el) { var password = el.val(); var retValue = {}; var strongRegex = new RegExp("^(?=.[a-z])(?=.[A-Z])(?=.[0-9])(?=.[!@#$%^&*])(?=.{8,})");
if (password == "") {
retValue.status = false;
retValue.msg = "Enter a password";
} else {
if (strongRegex.test(password)) {
retValue.status = true;
check_password = password
} else {
retValue.status = false;
retValue.msg = "Not strong enough.";
check_password = password
}
}
return retValue;
};
Not sure if this the best way. i added: var self = this; self.destroyPopover(el); before the popover is created in errorPopover: function