mirror of
https://github.com/internetee/registry.git
synced 2025-05-30 09:30:03 +02:00
Merge branch '114677695-idn_support' into staging
This commit is contained in:
commit
91169bd42f
2 changed files with 5 additions and 2 deletions
|
@ -28,6 +28,7 @@ class Nameserver < ActiveRecord::Base
|
||||||
],
|
],
|
||||||
'2005' => [
|
'2005' => [
|
||||||
[:hostname, :invalid, { value: { obj: 'hostAttr', val: hostname } }],
|
[:hostname, :invalid, { value: { obj: 'hostAttr', val: hostname } }],
|
||||||
|
[:hostname_puny, :puny_to_long, { value: { obj: 'hostAttr', val: hostname } }],
|
||||||
[:ipv4, :invalid, { value: { obj: 'hostAddr', val: ipv4 } }],
|
[:ipv4, :invalid, { value: { obj: 'hostAddr', val: ipv4 } }],
|
||||||
[:ipv6, :invalid, { value: { obj: 'hostAddr', val: ipv6 } }]
|
[:ipv6, :invalid, { value: { obj: 'hostAddr', val: ipv6 } }]
|
||||||
],
|
],
|
||||||
|
@ -44,8 +45,8 @@ class Nameserver < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_label_length
|
def check_label_length
|
||||||
hostname.split('.').each do |label|
|
hostname_puny.split('.').each do |label|
|
||||||
errors.add(:hostname, :invalid) if label.length > 63
|
errors.add(:hostname_puny, :puny_to_long) if label.length > 63
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -134,6 +134,8 @@ en:
|
||||||
hostname:
|
hostname:
|
||||||
invalid: 'Hostname is invalid'
|
invalid: 'Hostname is invalid'
|
||||||
taken: 'Nameserver already exists on this domain'
|
taken: 'Nameserver already exists on this domain'
|
||||||
|
hostname_puny:
|
||||||
|
puny_to_long: 'Hostname puny is too long (maximum is 63 characters)'
|
||||||
ipv4:
|
ipv4:
|
||||||
blank: 'IPv4 is missing'
|
blank: 'IPv4 is missing'
|
||||||
invalid: 'IPv4 is invalid'
|
invalid: 'IPv4 is invalid'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue