Sha256: b822673b1bc076f1b68702c3b3942f1a64cd81127605402118cc2a9b7bb3d057

Contents?: true

Size: 280 Bytes

Versions: 31

Compression:

Stored size: 280 Bytes

Contents

require 'byebug'
require 'dry-validation'

schema = Dry::Validation.Schema do
  key(:phone_numbers).each(:str?)
end

errors = schema.call(phone_numbers: '').messages

puts errors.inspect

errors = schema.call(phone_numbers: ['123456789', 123456789]).messages

puts errors.inspect

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
dry-validation-0.13.3 examples/each.rb
dry-validation-0.13.2 examples/each.rb
dry-validation-0.13.1 examples/each.rb
dry-validation-0.11.2 examples/each.rb
dry-validation-0.12.3 examples/each.rb
dry-validation-0.13.0 examples/each.rb
dry-validation-0.12.2 examples/each.rb
dry-validation-0.12.1 examples/each.rb
dry-validation-0.12.0 examples/each.rb
dry-validation-0.11.1 examples/each.rb
dry-validation-0.11.0 examples/each.rb
dry-validation-0.10.7 examples/each.rb
dry-validation-0.10.6 examples/each.rb
dry-validation-0.10.5 examples/each.rb
dry-validation-0.10.4 examples/each.rb
dry-validation-0.10.3 examples/each.rb
dry-validation-0.10.2 examples/each.rb
dry-validation-0.10.1 examples/each.rb
dry-validation-0.10.0 examples/each.rb
dry-validation-0.9.5 examples/each.rb