validate(typeOptions, fieldValue, errorMessages) {
    let momentDate = null;

    for (const formatOpt of typeOptions.formats) {
      momentDate = formatMap[formatOpt](fieldValue);

      if (momentDate.isValid()) {
        break;
      }
    }

    if (momentDate === null || !momentDate.isValid()) {
      errorMessages.push("The date format is invalid.");
      return false;
    }

    if (isPlainObject(typeOptions.range)) {
      if (typeOptions.range.min) {
        const min =
          typeOptions.range.min === "NOW"
            ? moment.utc()
            : typeOptions.range.min;

        if (momentDate.isBefore(min)) {
          errorMessages.push(
            "The provided date is before the defined minimum.",
          );
          return false;
        }
      }

      if (typeOptions.range.max) {
        const max =
          typeOptions.range.max === "NOW"
            ? moment.utc()
            : typeOptions.range.max;

        if (max.isBefore(momentDate)) {
          errorMessages.push("The provided date is after the defined maximum.");
          return false;
        }
      }
    }

    return true;
  }
@param {TypeOptions} typeOptions
@param {*} fieldValue
@param {string[]} errorMessages
@returns {boolean}