def validates_within(*attribute_names)
      options = Macros.extract_options(attribute_names)
      validation_rules.add(Rule::Within, attribute_names, options)
    end
def validates_within(*attribute_names)
      options = Macros.extract_options(attribute_names)
      validation_rules.add(Rule::Within, attribute_names, options)
    end
Validates that the value of a field is within a range/set.

 This validation is defined by passing a field along with a :set
 parameter. The :set can be a Range or any object which responds
 to the #include? method (an array, for example).

 @example Usage
   require 'virtus'
   require 'aequitas'

   class Review
     include Virtus
     include Aequitas

     STATES = ['new', 'in_progress', 'published', 'archived']

     attribute :title, String
     attribute :body, String
     attribute :review_state, String
     attribute :rating, Integer

     validates_within :review_state, :set => STATES
     validates_within :rating,       :set => 1..5

     # a call to valid? will return false unless
     # the two properties conform to their sets
   end