add_validator_to_context (DataMapper::Validate::ClassMethods)

    # File lib/dm-validations.rb, line 215
          def add_validator_to_context(opts, fields, klazz)
            fields.each do |field|
              validator = klazz.new(field, opts.dup)
              if opts[:context].is_a?(Symbol)
                unless validators.context(opts[:context]).include?(validator)
                  validators.context(opts[:context]) << validator
                  create_context_instance_methods(opts[:context])
                end
              elsif opts[:context].is_a?(Array)
                opts[:context].each do |c|
                  unless validators.context(c).include?(validator)
                    validators.context(c) << validator
                    create_context_instance_methods(c)
                  end
                end
              end
            end
          end