def validates_format_of(*attribute_names)
      options = Macros.extract_options(attribute_names)
      validation_rules.add(Rule::Format, attribute_names, options)
    end
def validates_format_of(*attribute_names)
      options = Macros.extract_options(attribute_names)
      validation_rules.add(Rule::Format, attribute_names, options)
    end
Validates that the attribute is in the specified format. You may
 use the :as (or :with, it's an alias) option to specify the
 pre-defined format that you want to validate against. You may also
 specify your own format via a Proc or Regexp passed to the the :as
 or :with options.

 @option [Boolean] :allow_nil (true)
   true or false.

 @option [Boolean] :allow_blank (true)
   true or false.

 @option [Format, Proc, Regexp] :as
   The pre-defined format, Proc or Regexp to validate against.

 @option [Format, Proc, Regexp] :with
   An alias for :as.

   :email_address (format is specified in Aequitas::Format::Email - note that unicode emails will *not* be matched under MRI1.8.7)
   :url (format is specified in Aequitas::Format::Url)

 @example Usage
   require 'virtus'
   require 'aequitas'

   class Page
     include Virtus
     include Aequitas

     attribute :email, String
     attribute :zip_code, String

     validates_format_of :email, :as => :email_address
     validates_format_of :zip_code, :with => /^\d{5}$/

     # a call to valid? will return false unless:
     # email is formatted like an email address
     # and
     # zip_code is a string of 5 digits
   end