Skip to content

regex validator support for negative MatchString #205

Open
@neatcoder

Description

@neatcoder

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions