mirror of
https://github.com/internetee/registry.git
synced 2025-07-31 15:06:23 +02:00
added condition
This commit is contained in:
parent
e6cb30b599
commit
9fa14c0c07
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ class Epp::Domain < Domain
|
||||||
# validate registrant here as well
|
# validate registrant here as well
|
||||||
([Contact.find(registrant.id)] + active_admins + active_techs).each do |x|
|
([Contact.find(registrant.id)] + active_admins + active_techs).each do |x|
|
||||||
unless x.valid?
|
unless x.valid?
|
||||||
if x.underage?
|
if x.type == 'AdminDomainContact' && x.underage?
|
||||||
add_epp_error('2304', nil, nil, I18n.t('activerecord.errors.models.domain.contact_too_young'))
|
add_epp_error('2304', nil, nil, I18n.t('activerecord.errors.models.domain.contact_too_young'))
|
||||||
else
|
else
|
||||||
add_epp_error('2304', nil, nil, I18n.t(:contact_is_not_valid, value: x.try(:code)))
|
add_epp_error('2304', nil, nil, I18n.t(:contact_is_not_valid, value: x.try(:code)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue