-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
wish: explicitly support input validation #215
Comments
yeah good call, nothing specific IIRC, since null etc could be valid, so if it's really invalid the function should throw |
If you want to coerce, just throw/error in your coercing function - there are no plans to do that in |
Keyword: choices like in python argparser choices: https://docs.python.org/3/library/argparse.html#choices |
Thanks for link @cirosantilli , added to open issue #518 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I see there is "coercion" now for input parameters, but it's not clear what happens if an invalid value is given that doesn't coerce.
For example, I have an option named
--format
that I want to restrict to values ofcsv
orjson
.If the coercion system already serves the purpose, the documentation should be updated to explain what happens when an argument is provided, but it fails to coerce.
The text was updated successfully, but these errors were encountered: