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

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Create a new validator of the given klazz and push it onto the requested context for each of the attributes in the fields list @param [Hash] opts
- !ruby/struct:SM::Flow::VERB 
  body: "   Options supplied to validation macro, example:\n   {:context=&gt;:default, :maximum=&gt;50, :allow_nil=&gt;true, :message=&gt;nil}\n"
- !ruby/struct:SM::Flow::P 
  body: "@param [Array&lt;Symbol&gt;] fields"
- !ruby/struct:SM::Flow::VERB 
  body: "   Fields given to validation macro, example:\n   [:first_name, :last_name] in validates_present :first_name, :last_name\n"
- !ruby/struct:SM::Flow::P 
  body: "@param [Class] klazz"
- !ruby/struct:SM::Flow::VERB 
  body: "   Validator class, example: DataMapper::Validate::LengthValidator\n"
full_name: DataMapper::Validate::ClassMethods#add_validator_to_context
is_singleton: false
name: add_validator_to_context
params: (opts, fields, klazz)
visibility: public
