mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 03:30:33 +02:00
REPP: Verify contact ident type
This commit is contained in:
parent
39c6d20413
commit
a73cd53bff
3 changed files with 17 additions and 9 deletions
|
@ -26,9 +26,14 @@ module Actions
|
|||
end
|
||||
|
||||
def validate_ident
|
||||
if ident.present? && ident[:ident_type].blank?
|
||||
contact.add_epp_error('2003', nil, 'ident_type', I18n.t('errors.messages.required_ident_attribute_missing'))
|
||||
@error = true
|
||||
if ident.present?
|
||||
if ident[:ident_type].blank?
|
||||
contact.add_epp_error('2003', nil, 'ident_type', I18n.t('errors.messages.required_ident_attribute_missing'))
|
||||
@error = true
|
||||
elsif !%w[priv org birthday].include?(ident[:ident_type])
|
||||
contact.add_epp_error('2003', nil, 'ident_type', 'Invalid ident type')
|
||||
@error = true
|
||||
end
|
||||
end
|
||||
|
||||
if ident.present? && ident[:ident_type] != 'birthday' && ident[:ident_country_code].blank?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue