mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 02:35:57 +02:00
parent
b20e31f3c8
commit
930a59ae67
4 changed files with 34 additions and 17 deletions
|
@ -19,8 +19,8 @@ class Domain < ActiveRecord::Base
|
|||
# TODO: whois requests ip whitelist for full info for own domains and partial info for other domains
|
||||
# TODO: most inputs should be trimmed before validatation, probably some global logic?
|
||||
|
||||
belongs_to :registrar
|
||||
belongs_to :registrant
|
||||
belongs_to :registrar, required: true
|
||||
belongs_to :registrant, required: true
|
||||
# TODO: should we user validates_associated :registrant here?
|
||||
|
||||
has_many :admin_domain_contacts
|
||||
|
@ -104,8 +104,7 @@ class Domain < ActiveRecord::Base
|
|||
|
||||
validates :name_dirty, domain_name: true, uniqueness: true
|
||||
validates :puny_label, length: { maximum: 63 }
|
||||
validates :period, numericality: { only_integer: true }
|
||||
validates :registrant, :registrar, presence: true
|
||||
validates :period, presence: true, numericality: { only_integer: true }
|
||||
|
||||
validate :validate_reservation
|
||||
def validate_reservation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue