mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 10:16:01 +02:00
Period validation
This commit is contained in:
parent
6990da7675
commit
1e2dad06f9
6 changed files with 16 additions and 1 deletions
|
@ -10,6 +10,7 @@ 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 }
|
||||
|
||||
def name=(value)
|
||||
value.strip!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue