Module: ActiveModel::Validations::HelperMethods

Defined in:
lib/validatious/helper_methods.rb

Instance Method Summary collapse

Instance Method Details

#validates_email_format_of(*attr_names) ⇒ Object



9
10
11
# File 'lib/validatious/helper_methods.rb', line 9

def validates_email_format_of(*attr_names)
  validates_with EmailValidator, _merge_attributes(attr_names)
end

#validates_postal_code_format_of(*attr_names) ⇒ Object



13
14
15
# File 'lib/validatious/helper_methods.rb', line 13

def validates_postal_code_format_of(*attr_names)
  validates_with PostalCodeValidator, _merge_attributes(attr_names)
end

#validates_text_content_of(*attr_names) ⇒ Object



17
18
19
# File 'lib/validatious/helper_methods.rb', line 17

def validates_text_content_of(*attr_names)
  validates_with TextContentValidator, _merge_attributes(attr_names)
end

#validates_url_format_of(*attr_names) ⇒ Object



5
6
7
# File 'lib/validatious/helper_methods.rb', line 5

def validates_url_format_of(*attr_names)
  validates_with UrlValidator, _merge_attributes(attr_names)
end