angular-bootstrap-show-errors icon indicating copy to clipboard operation
angular-bootstrap-show-errors copied to clipboard

update/remove .has-error after filling form using autocomplete

Open dasblitz opened this issue 11 years ago • 0 comments

First of all: tnx for the plugin, it works really nice :) It might as well be me doing something wrong but if I validate the form before any input is filled and then fill the form using autofill the .has-error class stays on all the fields. I've added this to the linkFn to make it work:

scope.$watch(function () {
  return formCtrl.$invalid
}, function (val) {
  if(val === false) {
    toggleClasses(val);
  }
});

Not sure if it's the right way to go though.

dasblitz avatar Sep 16 '14 16:09 dasblitz