lib/dry/validation/error.rb in dry-validation-0.8.0 vs lib/dry/validation/error.rb in dry-validation-0.9.0

- old
+ new

@@ -13,11 +13,14 @@ def schema? result.response.is_a?(Validation::Result) end def to_ast - node = [:error, [name, result.to_ast]] - schema? ? [:schema, node] : node + if schema? + [:schema, [name, result.response.to_ast]] + else + [:error, [name, result.to_ast]] + end end end end end