Merge remote-tracking branch 'origin/master' into story/118822101-epp-errors

This commit is contained in:
Vladimir Krylov 2016-06-21 19:34:41 +03:00
commit 2f0182b083
5 changed files with 31 additions and 7 deletions

View file

@ -478,7 +478,8 @@ class Domain < ActiveRecord::Base
def validate_nameserver_ips
nameservers.to_a.reject(&:marked_for_destruction?).each do |ns|
next unless ns.hostname.end_with?(".#{name}")
next if ns.ipv4.present?
next if ns.ipv4.present? || ns.ipv6.present?
errors.add(:nameservers, :invalid) if errors[:nameservers].blank?
ns.errors.add(:ipv4, :blank)
end

View file

@ -32,7 +32,7 @@ class Nameserver < ActiveRecord::Base
[:ipv4, :invalid, { value: { obj: 'hostAddr', val: ipv4 } }],
[:ipv6, :invalid, { value: { obj: 'hostAddr', val: ipv6 } }]
],
'2306' => [
'2003' => [
[:ipv4, :blank]
]
}