ExtensionConfig

Configuration options for validating file extensions.

The ExtensionConfig interface extends the BaseValidatorConfig interface to provide configuration options for validating file extensions. It allows you to specify valid extensions and control whether to exclude or include them in the validation.

Inheritence

Properties:

  • extensions (Optional): An array containing strings representing the valid file extensions (e.g., "jpg", "png", "pdf"). If not specified, validation might allow any extension.
  • isExcludeExtensions (Optional): A boolean flag indicating whether to exclude the listed extensions (extensions) from the validation (true) or include them as valid options (false). Defaults to false (include) if not specified.