Module: ActiveModel::Validations::Clusivity

Included in:
ExclusionValidator, InclusionValidator
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/validations/clusivity.rb

Overview

:nodoc:

Constant Summary collapse

ERROR_MESSAGE =
"An object with the method #include? or a proc, lambda or symbol is required, " \
"and must be supplied as the :in (or :within) option of the configuration hash"

Instance Method Summary collapse

Instance Method Details

#check_validity!Object



11
12
13
14
15
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.4/lib/active_model/validations/clusivity.rb', line 11

def check_validity!
  unless delimiter.respond_to?(:include?) || delimiter.respond_to?(:call) || delimiter.respond_to?(:to_sym)
    raise ArgumentError, ERROR_MESSAGE
  end
end