dry-schema icon indicating copy to clipboard operation
dry-schema copied to clipboard

Coercion and validation for data structures

Results 77 dry-schema issues
Sort by recently updated
recently updated
newest added

It's possible for left and right to be an array of messages when creating an Or::SinglePath, and it's possible for an Or::MultiPath to contain an Or::SinglePath. Adds the following fixes:...

The spec in this PR works in 1.9.3 but fails in our main branch with the following backtrace ``` 1) Registering custom types class-based definition maybe decimal coerces the type...

Hello, Piotr! I found a bug **Describe the bug** In `Params` processor when validation for a key with hash value fails then we get another error for a key with...

bug
help wanted

## Describe the bug Reusing a schema directly in the the array macro produces an unexpected exception when passed bad data. ## To Reproduce ``` NestedHash = Dry::Schema.Params { required(:code).filled(:string)...

bug
help wanted

## Describe the bug Given these two dry schemas: ```ruby A = Dry::Schema.JSON do required(:attributes).maybe(:hash) do required(:name).filled(:string, min_size?: 1) end end B = Dry::Schema.JSON do required(:data).array(A) end ``` I would...

bug
help wanted

Hi. Is it documented behaviour? I think it is not. ```ruby require 'dry-validation' require 'dry/validation/version' class NewUserContract < Dry::Validation::Contract params do config.validate_keys = true required(:email).filled(:string) required(:age).value(:integer) end end contract =...

bug
help wanted

The documented way of handling default values breaks using a struct in an array in `dry-schema`. When I remove this logic from my struct base class, there are no errors....

bug
help wanted

When an array of type struct is defined for a schema and an empty array is specified, the empty array is reported as the wrong type. This is not the...

bug
help wanted

Basically, I'd like to use `filter(format?: ...)` to validate date string inputs to our API. However, it is fine for this input to be `nil`. I only really want the...

feature