function matchInputMask(value, inputMask) {
  if (!inputMask) {
    return true;
  }

  // If value is longer than mask, it isn't valid.
  if (value.length > inputMask.length) {
    return false;
  }

  for (let i = 0; i < inputMask.length; i++) {
    const char = value[i] || '';
    const charPart = inputMask[i];

    if (!(_.isRegExp(charPart) && charPart.test(char) || charPart === char)) {
      return false;
    }
  }

  return true;
}
Returns true if the value matches the input mask format.
@param {string} value - The value to check.
@param {string} inputMask - The input mask to check against.
@returns {boolean} - TRUE if the value matches the input mask; FALSE otherwise.