Skip to main content

valid-value-for-pattern

Overview

This rule belongs to the custom-rules-linting ruleset and states that:

The target value being validated must match with the provided regex pattern.

PropertyValue
EnabledYes
Maximum SeverityError
MessageValue is not valid for given pattern.
CodeCUSTOMRULES_L001
TypeLinting
Rule SystemSemantic
Broad CategoryCustom Rules
Tagscustom rules semantic linting pattern regex

Suggested Fixes

  • Ensure that value does not contain any characters that are forbidden by the pattern e.g. whitespaces.
  • Ensure that the value does not violate any length requirements set by the pattern.
  • Ensure that the value contains all required characters mentioned in the pattern.
  • Ensure that the value does not violate case-sensitivity in case the pattern is case-sensitive.
  • Use an online tool to verify why the value is violating the pattern.

For More Information