Method: Sequel::Plugins::ValidationHelpers::InstanceMethods#validates_format

Defined in:
lib/sequel/plugins/validation_helpers.rb

#validates_format(with, atts, opts = OPTS) ⇒ Object

Check the string representation of the attribute value(s) against the regular expression with.



110
111
112
# File 'lib/sequel/plugins/validation_helpers.rb', line 110

def validates_format(with, atts, opts=OPTS)
  validatable_attributes_for_type(:format, atts, opts){|a,v,m| validation_error_message(m, with) unless v.to_s =~ with}
end