mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Merge branch 'story/120095555-ipv6-hostname' into staging
This commit is contained in:
commit
90778863ae
1 changed files with 3 additions and 1 deletions
|
@ -483,9 +483,11 @@ class Domain < ActiveRecord::Base
|
||||||
def validate_nameserver_ips
|
def validate_nameserver_ips
|
||||||
nameservers.to_a.reject(&:marked_for_destruction?).each do |ns|
|
nameservers.to_a.reject(&:marked_for_destruction?).each do |ns|
|
||||||
next unless ns.hostname.end_with?(".#{name}")
|
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?
|
errors.add(:nameservers, :invalid) if errors[:nameservers].blank?
|
||||||
ns.errors.add(:ipv4, :blank)
|
ns.errors.add(:ipv4, :blank)
|
||||||
|
ns.errors.add(:ipv6, :blank)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue