bootstrap-application-wizard icon indicating copy to clipboard operation
bootstrap-application-wizard copied to clipboard

errorPopover not updating message

Open PavtheDog opened this issue 5 years ago • 1 comments

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;

};

PavtheDog avatar Mar 14 '20 23:03 PavtheDog

Not sure if this the best way. i added: var self = this; self.destroyPopover(el); before the popover is created in errorPopover: function

PavtheDog avatar Mar 15 '20 01:03 PavtheDog