Sha256: 9dd1be05bb2324f10e0c1f354256e8c7afb537b40716fd05e5f462e4b041942b

Contents?: true

Size: 206 Bytes

Versions: 5

Compression:

Stored size: 206 Bytes

Contents

require 'dry-validation'

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

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

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

puts errors.inspect

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dry-validation-0.7.4 examples/form.rb
dry-validation-0.7.3 examples/form.rb
dry-validation-0.7.2 examples/form.rb
dry-validation-0.7.1 examples/form.rb
dry-validation-0.7.0 examples/form.rb