Closed fran-worley closed 8 years ago
Moved from dry-validation see https://github.com/dry-rb/dry-validation/issues/150
For :includes and :excludes and predicates I propose the following handling of nil and unsupported input types (e.g. Integers)
:includes
:excludes
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.)
@fran-worley interface checking is the right thing to do. 👍
Moved from dry-validation see https://github.com/dry-rb/dry-validation/issues/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.)