Skip to content
New issue

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

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

Already on GitHub? # to your account

Support mix/max definition for inner collection elements #11

Open
apenlor opened this issue Oct 31, 2023 · 0 comments
Open

Support mix/max definition for inner collection elements #11

apenlor opened this issue Oct 31, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@apenlor
Copy link
Contributor

apenlor commented Oct 31, 2023

At this moment, the @Max and @Min annotations can be used for:

  • Define the value range for a randomly generated numeric data type.
  • Delimite the number of elements included in a collection.
  @Max(12)
  @Min(1)
  private int number;

  @Max(12)
  @Min(1)
  private List<Integer> numbers;

As a developer, I would like the ability to define the value range for numeric data types within a collection.

Maybe creating a specific annotation for collection size definition, letting @Min and @Max reference just to the numeric data types.

  @MaxCollectionElements(7)
  @MinCollectionElements(1)
  @Max(12)
  @Min(1)
  private List<Integer> numbers;
  @CollectionElements(min = "1", max = "7")
  @Max(12)
  @Min(1)
  private List<Integer> numbers;
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant