Add option for `accepted_values` or `allowed_values` ?
praveenperera opened this issue · comments
Praveen Perera commented
What do you think about having an option to validate against and set number of options?
For example:
definition = [
status: [
type: :atom,
allowed_values: [:waiting, :started, :finished],
default: :waiting
],
]
Wojtek Mach commented
this is already supported via :one_of
, e.g.:
batch_mode: [type: {:one_of, [:flush, :bulk]}]]