setElementInvalid(element, invalid) {
    if (!element) return;

    if (invalid) {
      this.addClass(element, 'is-invalid');
    }
    else {
      this.removeClass(element, 'is-invalid');
    }
    element.setAttribute('aria-invalid', invalid ? 'true' : 'false');
  }
Adds the classes necessary to mark an element as invalid.
@param {HTMLElement} element - The element you wish to add the invalid classes to.
@param {boolean} invalid - TRUE if the component is invalid, FALSE otherwise.
@returns {void}