Sha256: 9c794d875deed86e854069918b3c6b1053e41111d85c8706ee36867f0a597081

Contents?: true

Size: 212 Bytes

Versions: 18

Compression:

Stored size: 212 Bytes

Contents

require 'dry-validation'

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

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

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

puts errors.inspect

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
dry-validation-0.11.2 examples/form.rb
dry-validation-0.11.1 examples/form.rb
dry-validation-0.11.0 examples/form.rb
dry-validation-0.10.7 examples/form.rb
dry-validation-0.10.6 examples/form.rb
dry-validation-0.10.5 examples/form.rb
dry-validation-0.10.4 examples/form.rb
dry-validation-0.10.3 examples/form.rb
dry-validation-0.10.2 examples/form.rb
dry-validation-0.10.1 examples/form.rb
dry-validation-0.10.0 examples/form.rb
dry-validation-0.9.5 examples/form.rb
dry-validation-0.9.4 examples/form.rb
dry-validation-0.9.3 examples/form.rb
dry-validation-0.9.2 examples/form.rb
dry-validation-0.9.1 examples/form.rb
dry-validation-0.9.0 examples/form.rb
dry-validation-0.8.0 examples/form.rb