Merge branch 'master' of github.com:domify/registry

This commit is contained in:
Martin Lensment 2015-06-02 15:10:40 +03:00
commit bf11806411
5 changed files with 94 additions and 1 deletions

View file

@ -70,6 +70,7 @@ class Domain < ActiveRecord::Base
after_save :update_whois_record
validates :name_dirty, domain_name: true, uniqueness: true
validates :name_puny, length: { maximum: 66 }
validates :period, numericality: { only_integer: true }
validates :registrant, :registrar, presence: true

View file

@ -55,7 +55,8 @@ class Epp::Domain < Domain
]
],
'2005' => [ # Parameter value syntax error
[:name_dirty, :invalid, { obj: 'name', val: name_dirty }]
[:name_dirty, :invalid, { obj: 'name', val: name_dirty }],
[:name_puny, :too_long, { obj: 'name', val: name_puny }]
],
'2201' => [ # Authorisation error
[:auth_info, :wrong_pw]