MaxTimeConfig

Configure maximum allowed time validation with comparison operators (<, <=), optional time value, field name, and allowing seconds in the format.

The MaxTimeConfig interface extends the BaseValidatorConfig interface to provide configuration options for validating a time against a maximum allowed value. It allows you to specify the comparison operator, optional time value, field name, and support for seconds.

Inheritence

Properties:

  • value (Optional): A string representing the maximum allowed time value in a format supported by the library (e.g., "HH:mm", "HH:mm:ss"). The validation will ensure the user-entered time is less than (or less than or equal to) the specified value.
  • fieldName (Optional): A string representing the name of the field associated with the validator. This can be used for dynamic error message construction (e.g., "End Time cannot be after Start Time").
  • allowSeconds (Optional): A boolean flag indicating whether to allow seconds in the time format (depends on library support). Defaults to false if not specified (assuming time format without seconds by default).
  • operator (Optional): A string representing the comparison operator for maximum time validation. Can be either "<" (less than) or "<=" (less than or equal to).

Inherits all properties from BaseValidatorConfig (e.g., message, messageKey, and potentially conditionalExpression depending on the library implementation).