summaryrefslogtreecommitdiff
path: root/app/models/switchboard.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/switchboard.rb')
-rw-r--r--app/models/switchboard.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/switchboard.rb b/app/models/switchboard.rb
index 53f69a4..cf8c708 100644
--- a/app/models/switchboard.rb
+++ b/app/models/switchboard.rb
@@ -18,6 +18,12 @@ class Switchboard < ActiveRecord::Base
:less_than => 5
}
+ validates :amount_of_displayed_phone_numbers,
+ :numericality => { :only_integer => true,
+ :greater_than_or_equal_to => 0,
+ :less_than => 20
+ }
+
belongs_to :user, :touch => true
has_many :switchboard_entries, :dependent => :destroy
has_many :sip_accounts, :through => :switchboard_entries