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

Adding Set validation for SizeAtLeast, SizeAtMost and SizeBetween #40

Merged
merged 11 commits into from
Jun 23, 2022

Conversation

bendbennett
Copy link
Contributor

Closes: #5

@bendbennett bendbennett requested a review from a team as a code owner June 21, 2022 15:36
@bendbennett bendbennett changed the base branch from main to bendbennett/issues-12 June 21, 2022 15:36
@bendbennett
Copy link
Contributor Author

Following discussion with @detro we could consolidate the SizeAtLeast, SizeAtMost and SizeBetween validators for List, Map and Set into a single generic validator if we don't require any type-specific validation.

@bflad bflad added enhancement New feature or request type/set types.Set validators labels Jun 22, 2022
Copy link
Member

@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.

Other than missing Go documentation for provider developers and changelog entry, looks good to me 🚀

}
}

func SizeAtLeast(min int) tfsdk.AttributeValidator {
Copy link
Member

Choose a reason for hiding this comment

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

Go documentation 😉

}
}

func SizeAtMost(max int) tfsdk.AttributeValidator {
Copy link
Member

Choose a reason for hiding this comment

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

Go documentation 😉

}
}

func SizeBetween(min, max int) tfsdk.AttributeValidator {
Copy link
Member

Choose a reason for hiding this comment

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

Go documentation 😉

@bflad bflad added this to the v0.3.0 milestone Jun 22, 2022
Base automatically changed from bendbennett/issues-12 to main June 23, 2022 11:33
@bendbennett bendbennett merged commit 32de284 into main Jun 23, 2022
@bendbennett bendbennett deleted the bendbennett/issues-5 branch June 23, 2022 11:50
bflad added a commit that referenced this pull request Jun 29, 2022
@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 Jul 24, 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/set types.Set validators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set Size Validation (SizeAtLeast / SizeAtMost / SizeBetween)
2 participants