nil input causes predicate errors
fran-worley opened this issue · comments
Fran Worley commented
Moved from dry-validation see dry-rb/dry-validation#150
For :includes
and :excludes
and predicates I propose the following handling of nil and unsupported input types (e.g. Integers)
Includes should return false as the input cannot include the desired value
Excludes should return true as for the same reason as the above.
A greater discussion should be had around other predicates where this may apply (e.g. :gt, :lt etc.)
Luca Guidi commented
@fran-worley interface checking is the right thing to do. 👍