dashbitco / nimble_options

A tiny library for validating and documenting high-level options. 💽
Apache License 2.0
507 stars 38 forks source link

Complex example of `one_of`? #36

Closed martinstreicher closed 4 years ago

martinstreicher commented 4 years ago

I posted a question about Nimble Options' one_of here. Is it possible to express nested options as arguments of one_of? Is there an example I can reference? I'd be happy to post a PR for the docs if someone can explain what choices can be in the usage  {:one_of, choices}

josevalim commented 4 years ago

Not really. You would have to use use custom validation instead.

martinstreicher commented 4 years ago

Thanks. It looks like the `choices` must be literal values.