Module: ActiveModel::Validations::HelperMethods

Defined in:
lib/valideez/nip_validator.rb,
lib/valideez/pesel_validator.rb,
lib/valideez/phone_validator.rb,
lib/valideez/regon_validator.rb,
lib/valideez/siret_validator.rb

Instance Method Summary collapse

Instance Method Details

#validates_nip_of(*attr_names) ⇒ Object



13
14
15
# File 'lib/valideez/nip_validator.rb', line 13

def validates_nip_of(*attr_names)
  validates_with NipValidator, _merge_attributes(attr_names)
end

#validates_pesel_of(*attr_names) ⇒ Object



16
17
18
# File 'lib/valideez/pesel_validator.rb', line 16

def validates_pesel_of(*attr_names)
  validates_with PeselValidator, _merge_attributes(attr_names)
end

#validates_phone_of(*attr_names) ⇒ Object



16
17
18
# File 'lib/valideez/phone_validator.rb', line 16

def validates_phone_of(*attr_names)
  validates_with PhoneValidator, _merge_attributes(attr_names)
end

#validates_regon_of(*attr_names) ⇒ Object



13
14
15
# File 'lib/valideez/regon_validator.rb', line 13

def validates_regon_of(*attr_names)
  validates_with RegonValidator, _merge_attributes(attr_names)
end

#validates_siret_of(*attr_names) ⇒ Object



13
14
15
# File 'lib/valideez/siret_validator.rb', line 13

def validates_siret_of(*attr_names)
  validates_with SiretValidator, _merge_attributes(attr_names)
end