PatternConfig

Configure validation based on regular expressions for different keys within a provided expression object.

The PatternConfig interface extends the BaseValidatorConfig interface to provide configuration options for validation using regular expressions. It allows you to define multiple regular expression patterns for different keys within an expression object.

Inheritence

Properties:

  • expression (Optional): An object containing key-value pairs where:
    • Keys are strings representing unique identifiers for the patterns.
    • Values are regular expression objects (RegExp) that define the validation rules for the corresponding key. Inherits all properties from BaseValidatorConfig (e.g., message, messageKey, and potentially conditionalExpression depending on the library implementation).