Skip to content

Commit 2d103bd

Browse files
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.
1 parent a56237c commit 2d103bd

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

app/models/epp/domain.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ def validate_contacts
2929
active_admins = admin_domain_contacts.select { |x| !x.marked_for_destruction? }
3030
active_techs = tech_domain_contacts.select { |x| !x.marked_for_destruction? }
3131

32-
# Проверка количества админ контактов
3332
if require_admin_contacts? && active_admins.empty?
34-
add_epp_error('2306', 'contact', nil, 'Admin contacts are required')
33+
add_epp_error('2306', 'contact', nil, 'Admin contact is required')
3534
ok = false
3635
end
3736

config/locales/en.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ en:
8181

8282
domain:
8383
<<: *epp_domain_ar_attributes
84-
admin_contact_invalid_ident_type: "Administrative contact with identification type '%{ident_type}' is not allowed"
84+
admin_contact_invalid_ident_type: "Admin contact can be private person only"
8585

8686
nameserver:
8787
attributes:

0 commit comments

Comments
 (0)