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

Specify min and max arity via attribute #409

Open
drewburlingame opened this issue Dec 19, 2021 · 0 comments
Open

Specify min and max arity via attribute #409

drewburlingame opened this issue Dec 19, 2021 · 0 comments
Labels
feature help wanted up-for-grabs Curated tasks specifically for new contributors (see https://up-for-grabs.net )

Comments

@drewburlingame
Copy link
Collaborator

Currently, the one way to specify a min other than 0 or 1 or a Max other than 0, 1 or "More" is via middleware or interceptor methods. It could be beneficial to be able to assign an arbitrary min and max for collection arguments. This would be done by adding MinCount & MaxCount properties to the Option and Operand attributes and checking the value in the ArgumentArity.Default method. There should be tests to verify the arity is set correctly and an InvalidConfigurationException should be thrown if the values are not valid for the type definition, i.e. if Min or Max is greater than 1 and the type is not an IEnumerable

@drewburlingame drewburlingame added help wanted feature up-for-grabs Curated tasks specifically for new contributors (see https://up-for-grabs.net ) labels Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature help wanted up-for-grabs Curated tasks specifically for new contributors (see https://up-for-grabs.net )
Projects
None yet
Development

No branches or pull requests

1 participant