Open dvv opened 3 months ago
interesting! the example you gave could be easily solved with a new directive for the :string
type like it exists for the :integer
one. something like {:range, min, max}
,
do you have any other examples that could be benefit with these keyword (aka multiple) validation directives?
Nope, nothing ATM
i was thinking and there're some constraints that doesn't make semantical sense to be together, and those will cause unexpected results, like:
{:integer, gt: 3, lt: 2}
so probably we want to filter and parse what are valid constraints, and i don't think this should be tackled right now.
do you think in any other simpler solution for this problem?
Description Right now we can not AFAICS apply several constraints to a type, e.g.:
Would IMO be nice to handle such cases in form of Keyword options:
Motivation To handle richer validation technique.
Alternatives None AFAICS