From 2d103bda995131cb89848b28171e57afd838a160 Mon Sep 17 00:00:00 2001 From: oleghasjanov Date: Wed, 5 Feb 2025 11:53:56 +0200 Subject: [PATCH] fix: improve admin contact validation messages - Update error message for missing admin contact to be more concise - Standardize admin contact validation message for invalid ident type - Remove redundant error message formatting The changes make admin contact validation messages more consistent throughout the application, using "Admin contact" terminology instead of "Administrative contact" for better clarity and consistency. --- app/models/epp/domain.rb | 3 +-- config/locales/en.yml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/models/epp/domain.rb b/app/models/epp/domain.rb index e97e810ab..0593e1652 100644 --- a/app/models/epp/domain.rb +++ b/app/models/epp/domain.rb @@ -29,9 +29,8 @@ class Epp::Domain < Domain active_admins = admin_domain_contacts.select { |x| !x.marked_for_destruction? } active_techs = tech_domain_contacts.select { |x| !x.marked_for_destruction? } - # Проверка количества админ контактов if require_admin_contacts? && active_admins.empty? - add_epp_error('2306', 'contact', nil, 'Admin contacts are required') + add_epp_error('2306', 'contact', nil, 'Admin contact is required') ok = false end diff --git a/config/locales/en.yml b/config/locales/en.yml index 4083747fe..164398e90 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -81,7 +81,7 @@ en: domain: <<: *epp_domain_ar_attributes - admin_contact_invalid_ident_type: "Administrative contact with identification type '%{ident_type}' is not allowed" + admin_contact_invalid_ident_type: "Admin contact can be private person only" nameserver: attributes: