Sha256: 8e2bbbcd614e0e8acd77a3865566dd5ec9cbc4679af25cc80e74d2630dc29ec1

Contents?: true

Size: 214 Bytes

Versions: 8

Compression:

Stored size: 214 Bytes

Contents

require 'dry-validation'

schema = Dry::Validation.Params do
  required(:email).filled

  required(:age).filled(:int?, gt?: 18)
end

errors = schema.call('email' => '', 'age' => '18').messages

puts errors.inspect

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dry-validation-0.13.3 examples/params.rb
dry-validation-0.13.2 examples/params.rb
dry-validation-0.13.1 examples/params.rb
dry-validation-0.12.3 examples/params.rb
dry-validation-0.13.0 examples/params.rb
dry-validation-0.12.2 examples/params.rb
dry-validation-0.12.1 examples/params.rb
dry-validation-0.12.0 examples/params.rb