Skip to content

Commit

Permalink
Merge pull request #610 from dry-rb/format_predicate
Browse files Browse the repository at this point in the history
Add missing `format?` predicate as macro
  • Loading branch information
solnic committed Jan 2, 2020
2 parents abaa386 + 2296d92 commit ca0f4c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/dry/validation/extensions/predicates_as_macros.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/extensions/predicates_as_macros/contract_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down

0 comments on commit ca0f4c1

Please sign in to comment.