[PATCH] BZ 784479 add range validation to priority

Tzu-Mainn Chen tzumainn at redhat.com
Thu Feb 23 17:54:20 UTC 2012


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

diff --git a/src/app/models/provider_account.rb b/src/app/models/provider_account.rb
index eff59f9..49f8e67 100644
--- a/src/app/models/provider_account.rb
+++ b/src/app/models/provider_account.rb
@@ -66,7 +66,7 @@ class ProviderAccount < ActiveRecord::Base
   validate :validate_presence_of_credentials
   validate :validate_credentials
   validate :validate_unique_username
-  validates :priority, :numericality => { :only_integer => true}, :allow_blank => true
+  validates :priority, :numericality => { :only_integer => true, :greater_than_or_equal_to => -100000, :less_than_or_equal_to => 100000}, :allow_blank => true
 
   before_create :populate_profiles_and_validate
   after_create :populate_realms_and_validate
-- 
1.7.6.5




More information about the aeolus-devel mailing list