Dry-validation doesn't detect time in ISO-8601 format

Hey,
while trying to upgrade dry-validation from 0.11.0 to 1.5.6 I noticed that times in ISO-8601 format ( which is commonly used as a JSON representation of times) are no longer passing the validation.

Example:

    Dry::Validation.Contract { json{required(:time).filled(:time?)} }.call(time: "2017-07-27T10:50:02.522Z")

Is this expected?

:time? is only a predicate, you need to use :time which will include coercion

2 Likes

Thank you! :bowing_man: