Closed NYPD closed 7 years ago
var errorElement = useBootstrap3Stlying ? _getClosestParentByClass(element, 'form-group') : element; var isInvalid = element.getAttribute('data-invalid') === 'true'; if (isInvalid) errorElement.classList.add('has-error'); else errorElement.classList.remove('has-error');
errorElement will be null therefore not be able read the property classList of null.
errorElement
classList
So basically if it can not find the form-group, use the element itself
errorElement
will be null therefore not be able read the propertyclassList
of null.So basically if it can not find the form-group, use the element itself