mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 08:22:05 +02:00
Domain name presence validation
This commit is contained in:
parent
bfb9abea8c
commit
8882c36053
5 changed files with 19 additions and 7 deletions
|
@ -8,6 +8,8 @@ class Domain < ActiveRecord::Base
|
|||
belongs_to :technical_contact, class_name: 'Contact'
|
||||
belongs_to :admin_contact, class_name: 'Contact'
|
||||
|
||||
validates_presence_of :name
|
||||
|
||||
validates :name, domain_name: true, uniqueness: { message: I18n.t('errors.messages.epp_domain_taken') }
|
||||
validates :name_puny, domain_name: true
|
||||
validates :period, numericality: { only_integer: true, greater_than: 0, less_than: 100 }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue