mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 00:42:04 +02:00
created birth date validator
This commit is contained in:
parent
33a855fbe7
commit
addeebfeb3
6 changed files with 32 additions and 34 deletions
|
@ -13,6 +13,7 @@ class Contact::Ident
|
|||
validates :type, presence: true, inclusion: { in: proc { types } }
|
||||
validates :country_code, presence: true, iso31661_alpha2: true
|
||||
validates_with MismatchValidator
|
||||
validates_with BirthDateValidator, if: :birthday?
|
||||
|
||||
def self.epp_code_map
|
||||
{
|
||||
|
@ -26,6 +27,7 @@ class Contact::Ident
|
|||
[:code, :invalid_national_id],
|
||||
[:code, :invalid_reg_no],
|
||||
[:code, :invalid_iso8601_date],
|
||||
[:code, :invalid_birth_date],
|
||||
[:country_code, :invalid_iso31661_alpha2]
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue