You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't seem find any in the documentation about choices option.
Like in python there is choices option in the argument. Is it possible to do with this great extension?
Thank you that solved my problem. However there's just little problem when I set the default and input invalid value, It's not throwing the exception but still getting the default value only. But it's ok I just skip the default value
Activity
Matthiee commentedon Apr 27, 2022
At the moment it is not possible.
However I feel like you could get very close using
enum's.Example:
Another way to achieve this without enums would be to use FluentValidations Extension.
zackmark29 commentedon Apr 27, 2022
Thank you for the response. Yeah Enum is good idea I'll do it instead.
I still preferred your extension it's easy to use :)
zackmark29 commentedon Apr 27, 2022
Thank you that solved my problem. However there's just little problem when I set the default and input invalid value, It's not throwing the exception but still getting the default value only. But it's ok I just skip the default value
Matthiee commentedon Apr 27, 2022
I do like the choices idea.
API could look something like this:
Not sure how this would work when the option type is a
Collection.