function markInputAsInvalid(
  inputElement,
  addShakeAnimation = false,
  scrollIntoView = true,
) {
  inputElement.classList.add(['input-err']);

  if (addShakeAnimation) {
    inputElement.classList.add(['shake']);
    setTimeout(() => inputElement.classList.remove(['shake']), 300);
  }

  if (scrollIntoView) {
    inputElement.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
  }
}
Adds additional styles to the `inputElement`,
giving users visual cue if the input is invalid.

@param {Element} inputElement
The target `input` DOM Element to apply the styles on

@param {boolean} addShakeAnimation
Whether additional shaking animation should be applied to the `inputElement`.
_(Defaults to `false`)_

@param scrollIntoView
Scrolls the element into view. _(Defaults to `true`)_