Sha256: 9f88682d4f7cb57ce690968d0d8531bc1dc6b7be18550e0cc40d7ff344a9ff21
Contents?: true
Size: 357 Bytes
Versions: 26
Compression:
Stored size: 357 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: '', age: 18, address: {} } puts schema.(input).inspect Hotch() do 10_000.times do schema.(input) end end
Version data entries
26 entries across 26 versions & 1 rubygems