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

String LengthAtLeast, LengthAtMost and LengthBetween validators #22

Merged
merged 2 commits into from
May 25, 2022
Merged

String LengthAtLeast, LengthAtMost and LengthBetween validators #22

merged 2 commits into from
May 25, 2022

Conversation

ewbankkit
Copy link
Contributor

Closes #3.

% go test -v ./stringvalidator 
=== RUN   TestLengthAtLeastValidator
=== PAUSE TestLengthAtLeastValidator
=== RUN   TestLengthAtMostValidator
=== PAUSE TestLengthAtMostValidator
=== RUN   TestLengthBetweenValidator
=== PAUSE TestLengthBetweenValidator
=== CONT  TestLengthAtLeastValidator
=== RUN   TestLengthAtLeastValidator/not_a_String
=== CONT  TestLengthBetweenValidator
=== RUN   TestLengthBetweenValidator/not_a_String
=== CONT  TestLengthAtMostValidator
=== RUN   TestLengthAtMostValidator/not_a_String
=== RUN   TestLengthAtLeastValidator/unknown_String
=== RUN   TestLengthBetweenValidator/unknown_String
=== RUN   TestLengthBetweenValidator/null_String
=== RUN   TestLengthAtLeastValidator/null_String
=== RUN   TestLengthBetweenValidator/valid_String
=== RUN   TestLengthAtMostValidator/unknown_String
=== RUN   TestLengthAtLeastValidator/valid_String
=== RUN   TestLengthAtLeastValidator/too_short_String
=== RUN   TestLengthAtMostValidator/null_String
=== RUN   TestLengthBetweenValidator/too_long_String
=== RUN   TestLengthAtMostValidator/valid_String
=== RUN   TestLengthBetweenValidator/too_short_String
--- PASS: TestLengthAtLeastValidator (0.00s)
    --- PASS: TestLengthAtLeastValidator/not_a_String (0.00s)
    --- PASS: TestLengthAtLeastValidator/unknown_String (0.00s)
    --- PASS: TestLengthAtLeastValidator/null_String (0.00s)
    --- PASS: TestLengthAtLeastValidator/valid_String (0.00s)
    --- PASS: TestLengthAtLeastValidator/too_short_String (0.00s)
--- PASS: TestLengthBetweenValidator (0.00s)
    --- PASS: TestLengthBetweenValidator/not_a_String (0.00s)
    --- PASS: TestLengthBetweenValidator/unknown_String (0.00s)
    --- PASS: TestLengthBetweenValidator/null_String (0.00s)
    --- PASS: TestLengthBetweenValidator/valid_String (0.00s)
    --- PASS: TestLengthBetweenValidator/too_long_String (0.00s)
    --- PASS: TestLengthBetweenValidator/too_short_String (0.00s)
=== RUN   TestLengthAtMostValidator/too_long_String
--- PASS: TestLengthAtMostValidator (0.00s)
    --- PASS: TestLengthAtMostValidator/not_a_String (0.00s)
    --- PASS: TestLengthAtMostValidator/unknown_String (0.00s)
    --- PASS: TestLengthAtMostValidator/null_String (0.00s)
    --- PASS: TestLengthAtMostValidator/valid_String (0.00s)
    --- PASS: TestLengthAtMostValidator/too_long_String (0.00s)
PASS
ok  	github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator	0.907s

@ewbankkit ewbankkit marked this pull request as ready for review May 25, 2022 12:27
@ewbankkit ewbankkit requested a review from a team as a code owner May 25, 2022 12:27
@bflad bflad self-assigned this May 25, 2022
@bflad bflad added enhancement New feature or request type/string types.String validators labels May 25, 2022
@bflad bflad added this to the v0.1.0 milestone May 25, 2022
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks @ewbankkit 🚀

@bflad bflad merged commit 19aa7ab into hashicorp:main May 25, 2022
@ewbankkit ewbankkit deleted the f-string-length-validation branch May 25, 2022 12:47
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request type/string types.String validators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

String Length Validation (LengthAtLeast / LengthAtMost / LengthBetween)
2 participants