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
maybehas become an extension, so to use it you need to do
nil_or_string = Types::Strict::Nil | Types::Strict::Stringcould just be
nil_or_string = Types::Strict::String.optional, amirite?
optionalis a shortcut for summing nil with another type
Types::Coercible::String.maybeis just an alias for
#maybemethod just turns a type into a maybe type, the built-in maybe types are created using this method
Notice that you must add the :email_absence message to the configuration if you want to have the error converted to a message.
ruleblock from that example to inside the schema's
configureblock? What's the syntax for defining high-level rules inside