hashicorp / hashicorp/terraform-plugin-framework-validators
regex validator support for negative MatchString
- Dominant language
- Go
- Stars
- 28
- Forks
- 13
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 1
Description
### Terraform CLI and Framework Versions
TF: 1.7.5
framework: 0.12.0
### Use Cases or Problem Statement
Since golang doesn't support lookahead and lookbehind regular expressions, it would be easier to have a solution in `stringvalidator` package for negative regex match. For example:
Validation to match any string that does not start with `GITHUB_`. Usually it is done with negative lookahead but `golang` does not support it. TF Framework only supports "match" pattern but there is no function provided o work with elimination or strings that don't match a pattern.
### Proposal
New `RegexNotMacthes` function could be defined in `stringvalidator` package so that it approves a string that does not match a given regex pattern.
### Additional Information
_No response_
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Contributor guide
Assessment
This issue has not been assessed yet.