Sha256: c2eece7ac90dc7fded9e0d61253e4676ddde1d92fa60e4313495cb6a91217f4d

Contents?: true

Size: 385 Bytes

Versions: 26

Compression:

Stored size: 385 Bytes

Contents

require_relative 'suite'
require 'hotch'

schema = Dry::Validation.Schema do
  configure { config.messages = :i18n }

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

input = { email: 'jane@doe.org', age: 19, address: { city: 'Krakow' } }

puts schema.(input).inspect

Hotch() do
  10_000.times do
    schema.(input)
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

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