Merge branch '114677695-idn_support' into staging

This commit is contained in:
Stas 2016-05-27 16:43:50 +03:00
commit 2b69ae3305
2 changed files with 3 additions and 4 deletions

View file

@ -28,7 +28,7 @@ class Nameserver < ActiveRecord::Base
],
'2005' => [
[:hostname, :invalid, { value: { obj: 'hostAttr', val: hostname } }],
[:hostname_puny, :puny_to_long, { value: { obj: 'hostAttr', val: hostname } }],
[:hostname, :puny_to_long, { value: { obj: 'hostAttr', val: hostname } }],
[:ipv4, :invalid, { value: { obj: 'hostAddr', val: ipv4 } }],
[:ipv6, :invalid, { value: { obj: 'hostAddr', val: ipv6 } }]
],
@ -46,7 +46,7 @@ class Nameserver < ActiveRecord::Base
def check_label_length
hostname_puny.split('.').each do |label|
errors.add(:hostname_puny, :puny_to_long) if label.length > 63
errors.add(:hostname, :puny_to_long) if label.length > 63
end
end

View file

@ -134,8 +134,7 @@ en:
hostname:
invalid: 'Hostname is invalid'
taken: 'Nameserver already exists on this domain'
hostname_puny:
puny_to_long: 'Hostname puny is too long (maximum is 63 characters)'
puny_to_long: 'Hostname puny label is too long (maximum is 63 characters)'
ipv4:
blank: 'IPv4 is missing'
invalid: 'IPv4 is invalid'