From 2296d920478090b3e6fdbd9996855e37e7763166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Busqu=C3=A9?= Date: Wed, 1 Jan 2020 21:55:01 +0100 Subject: [PATCH] Add missing `format?` predicate as macro Ref #608 --- lib/dry/validation/extensions/predicates_as_macros.rb | 2 +- spec/extensions/predicates_as_macros/contract_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dry/validation/extensions/predicates_as_macros.rb b/lib/dry/validation/extensions/predicates_as_macros.rb index 01e84a62..3d541f44 100644 --- a/lib/dry/validation/extensions/predicates_as_macros.rb +++ b/lib/dry/validation/extensions/predicates_as_macros.rb @@ -12,7 +12,7 @@ class PredicateRegistry < Schema::PredicateRegistry # # @see Dry::Validation::Contract WHITELIST = %i[ - filled? gt? gteq? included_in? includes? inclusion? is? lt? + filled? format? gt? gteq? included_in? includes? inclusion? is? lt? lteq? max_size? min_size? not_eql? odd? respond_to? size? true? uuid_v4? ].freeze diff --git a/spec/extensions/predicates_as_macros/contract_spec.rb b/spec/extensions/predicates_as_macros/contract_spec.rb index 5af87c27..7e6f4de8 100644 --- a/spec/extensions/predicates_as_macros/contract_spec.rb +++ b/spec/extensions/predicates_as_macros/contract_spec.rb @@ -15,7 +15,7 @@ let(:registry) { Dry::Validation::PredicateRegistry.new } %i[ - filled? gt? gteq? included_in? includes? inclusion? is? lt? + filled? format? gt? gteq? included_in? includes? inclusion? is? lt? lteq? max_size? min_size? not_eql? odd? respond_to? size? true? uuid_v4? ].each do |predicate|