I have the code
class PostSchema < Dry::Validation::Contract params do required(:title).value(:string, size: 20) required(:content).value(:string, size: 50) end rule do # prevent this rule to execute if shema validation did not passed end end
My current work around is use
result.schema_result.success?. Even this working but I look at the source code at https://github.com/dry-rb/dry-validation/blob/master/lib/dry/validation/result.rb#L41. It is private api. Anyone has any idea about this?