module ActiveModel::Validations::ClassMethods
Public Instance Methods
validates_by_zxcvbn_metric(*attr_names)
click to toggle source
Validates whether or not the specified URL is valid.
class User < ActiveRecord::Base validates_url_format_of :site # Validates against a list of valid TLD. validates_url_format_of :site, tld: true end
# File lib/tough/validators/zxcvbn_password_validator.rb, line 25 def validates_by_zxcvbn_metric(*attr_names) validates_with ZxcvbnPasswordValidator, _merge_attributes(attr_names) end
Also aliased as: validates_with_zxcvbn
validates_capitals_and_lowercase(*attr_names)
click to toggle source
Validates whether or not the specified URL is valid.
class User < ActiveRecord::Base validates_url_format_of :site # Validates against a list of valid TLD. validates_url_format_of :site, tld: true end
# File lib/tough/validators/capitals_and_lowercase_validator.rb, line 20 def validates_capitals_and_lowercase(*attr_names) validates_with CapitalsAndLowercaseValidator, _merge_attributes(attr_names) end
Also aliased as: validates_capitals_and_lowercase_for
validates_minimum_characters(*attr_names)
click to toggle source
Validates whether or not the specified URL is valid.
class User < ActiveRecord::Base validates_url_format_of :site # Validates against a list of valid TLD. validates_url_format_of :site, tld: true end
# File lib/tough/validators/minimum_characters_validator.rb, line 20 def validates_minimum_characters(*attr_names) validates_with MinimumCharactersValidator, _merge_attributes(attr_names) end
Also aliased as: validates_minimum_characters_for
validates_special_characters(*attr_names)
click to toggle source
Validates whether or not the specified URL is valid.
class User < ActiveRecord::Base validates_url_format_of :site # Validates against a list of valid TLD. validates_url_format_of :site, tld: true end
# File lib/tough/validators/special_characters_validator.rb, line 20 def validates_special_characters(*attr_names) validates_with SpecialCharactersValidator, _merge_attributes(attr_names) end
Also aliased as: validates_special_characters_for