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

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/struct:SM::Flow::P 
  body: "@option :allow_nil&lt;Boolean&gt; true/false (default is true) @option :as&lt;Format, Proc, Regexp&gt; the pre-defined format, Proc or Regexp to validate against @option :with&lt;Format, Proc, Regexp&gt; an alias for :as"
- !ruby/struct:SM::Flow::P 
  body: "@details [Pre-defined Formats]"
- !ruby/struct:SM::Flow::VERB 
  body: "  :email_address (format is specified in DataMapper::Validate::Format::Email)\n  :url (format is specified in DataMapper::Validate::Format::Url)\n"
- !ruby/struct:SM::Flow::P 
  body: "@example [Usage]"
- !ruby/struct:SM::Flow::VERB 
  body: "  require 'dm-validations'\n\n  class Page\n    include DataMapper::Resource\n\n    property :email, String\n    property :zip_code, String\n\n    validates_format :email, :as =&gt; :email_address\n    validates_format :zip_code, :with =&gt; /^\\d{5}$/\n\n    # a call to valid? will return false unless:\n    # email is formatted like an email address\n    # and\n    # zip_code is a string of 5 digits\n"
full_name: DataMapper::Validate::ValidatesFormat#validates_format
is_singleton: false
name: validates_format
params: (*fields)
visibility: public
