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.
This commit is contained in:
oleghasjanov 2025-02-05 11:53:56 +02:00
parent a56237c84f
commit 2d103bda99
2 changed files with 2 additions and 3 deletions

View file

@ -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

View file

@ -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: