hashicorp / terraform-plugin-framework-validators

Common Use Case Validators for terraform-plugin-framework
Mozilla Public License 2.0
25 stars 12 forks source link

Minor fix to `stringvalidator.LengthBetween()` #157

Closed chrismarget closed 1 year ago

chrismarget commented 1 year ago

I wrote some bugs by relying on LengthBetween()'s Go doc comment.

The Go doc comment now more accurately reflects the validator behavior.

An unnecessary validation (max cannot be less than zero, even without this check) was removed.

bendbennett commented 1 year ago

Hi @chrismarget 👋

Thank you for the PR.

Could I ask that you add a couple of tests to verify that the "greater than or equal to" conditions are met for both minLength and maxLength. Thanks!

chrismarget commented 1 year ago

Hi @bendbennett,

I think 00165d6 has what you're looking for.

bendbennett commented 1 year ago

Thanks for the contribution @chrismarget 👍

github-actions[bot] commented 1 year ago

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.