--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Adds a validation for each of the given attributes using the supplied block. The block must accept three arguments: instance, attribute and value, e.g.:"
- !ruby/struct:SM::Flow::VERB 
  body: "  validates_each :name, :password do |object, attribute, value|\n    object.errors.add(attribute, 'is not nice') unless value.nice?\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: "Possible Options:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: ":allow_blank - Whether to skip the validation if the value is blank."
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: ":allow_missing - Whether to skip the validation if the attribute isn't a key in the values hash. This is different from allow_nil, because Sequel only sends the attributes in the values when doing an insert or update. If the attribute is not present, Sequel doesn't specify it, so the database will use the table's default value. This is different from having an attribute in values with a value of nil, which Sequel will send as NULL. If your database table has a non NULL default, this may be a good option to use. You don't want to use allow_nil, because if the attribute is in values but has a value nil, Sequel will attempt to insert a NULL value into the database, instead of using the database's default."
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: ":allow_nil - Whether to skip the validation if the value is nil."
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: ":if - A symbol (indicating an instance_method) or proc (which is instance_evaled) skipping this validation if it returns nil or false."
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: ":tag - The tag to use for this validation."
  type: :BULLET
full_name: Sequel::Plugins::ValidationClassMethods::ClassMethods#validates_each
is_singleton: false
name: validates_each
params: (*atts, &block)
visibility: public
