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.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Value is not valid for given pattern. |
| Code | CUSTOMRULES_L001 |
| Type | Linting |
| Rule System | Semantic |
| Broad Category | Custom Rules |
| Tags | custom 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.