From: martyntaylor <[email protected]>

---
 src/app/models/quota.rb |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/app/models/quota.rb b/src/app/models/quota.rb
index ad35076..83c20c4 100644
--- a/src/app/models/quota.rb
+++ b/src/app/models/quota.rb
@@ -25,8 +25,17 @@ class Quota < ActiveRecord::Base
   has_one :cloud_account
   has_one :user
 
-  validates_numericality_of :maximum_total_instances, 
:greater_than_or_equal_to => 0, :allow_nil => true
-  validates_numericality_of :maximum_running_instances, 
:greater_than_or_equal_to => 0, :allow_nil => true
+  validates_numericality_of :maximum_total_instances,
+                            :greater_than_or_equal_to => 0,
+                            :less_than_or_equal_to => 2147483647,
+                            :integer_only => true,
+                            :allow_nil => true
+
+  validates_numericality_of :maximum_running_instances,
+                            :greater_than_or_equal_to => 0,
+                            :less_than_or_equal_to => 2147483647,
+                            :integer_only => true,
+                            :allow_nil => true
 
   QuotaResource = Struct.new(:name, :used, :max, :available, :unit)
 
-- 
1.7.2.3

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to