These are chat archives for dry-rb/chat
Next-gen ruby libs! » github.com/dry-rb » website: https://dry-rb.org » forum: https://discourse.dry-rb.org
:cdefined on it, eg?
separate question: is it possible to specify a custom error message when a constraint is violated. eg, consider:
URI = Types::Strict::String.constrained(format: URI::regexp)
when this is violated, the message includes the very long URI regexp. it would be nice if I could specify the message as “The string does not match URI::regexp”
in a way, dry-types targets data, not objects
would it be fair to say that in “the dry rb way,” object dependencies would be handled with the auto-injector, and data dependencies would be handles with dry-struct / dry-types?
and for producing nice messages there's
yeah, my question was specifically about the type error messages. it’s a small point, not really important.