Owner contact validation

This commit is contained in:
Martin Lensment 2014-07-31 11:44:52 +03:00
parent 4396ec665c
commit 62b3ff6fc7
5 changed files with 45 additions and 34 deletions

View file

@ -22,6 +22,9 @@ class Domain < ActiveRecord::Base
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 }
validates :owner_contact, presence: true
# validates :tech_contacts_count
# validates :admin_contacts_count
def name=(value)
value.strip!