Render EPP error when IP missing for glue record

This commit is contained in:
Karl Erik Õunapuu 2020-03-11 16:24:42 +02:00
parent 1728ccaa5a
commit ecbed47a68

View file

@ -48,7 +48,7 @@ class Nameserver < ApplicationRecord
[:ipv6, :invalid, { value: { obj: 'hostAddr', val: ipv6 } }]
],
'2003' => [
[:ipv4, :blank]
%i[base ip_required],
]
}
end
@ -83,6 +83,7 @@ class Nameserver < ApplicationRecord
def glue_record_required?
return unless hostname? && domain
DomainName(hostname).domain == domain.name
end