mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 09:21:43 +02:00
Fix some more CC issues
This commit is contained in:
parent
cdf28befca
commit
aac74e26f1
4 changed files with 17 additions and 17 deletions
|
@ -27,12 +27,7 @@ module Actions
|
|||
|
||||
def validate_ident
|
||||
validate_ident_integrity
|
||||
|
||||
if ident.present? && ident[:ident_type] != 'birthday' && ident[:ident_country_code].blank?
|
||||
contact.add_epp_error('2003', nil, 'ident_country_code',
|
||||
I18n.t('errors.messages.required_ident_attribute_missing'))
|
||||
@error = true
|
||||
end
|
||||
validate_ident_birthday
|
||||
|
||||
identifier = ::Contact::Ident.new(code: ident[:ident], type: ident[:ident_type],
|
||||
country_code: ident[:ident_country_code])
|
||||
|
@ -54,6 +49,15 @@ module Actions
|
|||
end
|
||||
end
|
||||
|
||||
def validate_ident_birthday
|
||||
return if ident.blank?
|
||||
return unless ident[:ident_type] != 'birthday' && ident[:ident_country_code].blank?
|
||||
|
||||
contact.add_epp_error('2003', nil, 'ident_country_code',
|
||||
I18n.t('errors.messages.required_ident_attribute_missing'))
|
||||
@error = true
|
||||
end
|
||||
|
||||
def maybe_attach_legal_doc
|
||||
return unless legal_document
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue