function checkInteger(node) {
  const stringValue = $(node).text().trim();
  if (stringValue === '') {
    $(node).removeClass('invalid');
  } else if (INTEGER_PATTERN.test(stringValue)) {
    $(node).removeClass('invalid');
  } else {
    $(node).addClass('invalid');
  }
}
/**
 * Determines if the text entered in an integer input is valid by forbidding
 * any characters besides 0-9 and a leading hyphen.
 * @param {!Node} node
 */
Determines if the text entered in an integer input is valid by forbidding
any characters besides 0-9 and a leading hyphen.
@param {!Node} node
Determines if the text entered in an integer input is valid by forbidding any characters besides 0 - 9 and a leading hyphen . @param { !Node } node
function checkInteger(node) {
  const stringValue = $(node).text().trim();
  if (stringValue === '') {
    $(node).removeClass('invalid');
  } else if (INTEGER_PATTERN.test(stringValue)) {
    $(node).removeClass('invalid');
  } else {
    $(node).addClass('invalid');
  }
}
function checkInteger ( node ) { const stringValue = $ ( node ) . text ( ) . trim ( ) ; if ( stringValue === '' ) { $ ( node ) . removeClass ( 'invalid' ) ; } else if ( INTEGER_PATTERN . test ( stringValue ) ) { $ ( node ) . removeClass ( 'invalid' ) ; } else { $ ( node ) . addClass ( 'invalid' ) ; } }
Determines if the text entered in an integer input is valid by forbidding
 any characters besides 0-9 and a leading hyphen.
Determines if the text entered in an integer input is valid by forbidding any characters besides 0 - 9 and a leading hyphen .