I’m trying to validate a time parameter that should be iso8601 formatted. Is there a way to check the raw string input against a regex before it is coerced into a Time object when using Dry::Validation.Form? Because using
Unfortunately no, but I’m glad you asked about this, as it is precisely one of the big things I’m planning to improve in dry-validation 1.0. There’s a big missing concept here, which is validating input prior coercion. I don’t know how the API will look like, but something like this, more or less:
What will happen in such case, is that since there are no rules for the output value, it will assume that coercion and its result is everything we need to check, which is: