mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 11:38:30 +02:00
Better contact validation
This commit is contained in:
parent
c78e40a65a
commit
5003a3ff20
5 changed files with 53 additions and 5 deletions
|
@ -7,7 +7,9 @@ module Epp::DomainsHelper
|
|||
render '/epp/domains/create'
|
||||
else
|
||||
handle_domain_name_errors
|
||||
handle_contact_errors
|
||||
render '/epp/error'
|
||||
raise ActiveRecord::Rollback
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -56,4 +58,10 @@ module Epp::DomainsHelper
|
|||
end
|
||||
end
|
||||
|
||||
def handle_contact_errors
|
||||
if @domain.errors.added?(:admin_contacts, :blank)
|
||||
epp_errors << {code: '2306', msg: @domain.errors[:admin_contacts].first}
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue