Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regex validator support for negative MatchString #205

Open
1 task done
neatcoder opened this issue Apr 8, 2024 · 0 comments
Open
1 task done

regex validator support for negative MatchString #205

neatcoder opened this issue Apr 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@neatcoder
Copy link

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

  • I agree to follow this project's Code of Conduct
@neatcoder neatcoder added the enhancement New feature or request label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant