OSDN Git Service

Allow short project names
authorWouter D'Haeseleer <wouter.dhaeseleer@vasco.com>
Thu, 3 May 2012 10:53:24 +0000 (12:53 +0200)
committerWouter D'Haeseleer <wouter.dhaeseleer@vasco.com>
Thu, 3 May 2012 10:53:24 +0000 (12:53 +0200)
We have some projects which a length of 2.
With this I lower the minimum lenght to 1.
As I could not found a specific reason why it is set to 3...

app/models/project/validations_trait.rb

index 2a97084..d2d207c 100644 (file)
@@ -20,7 +20,7 @@ module Project::ValidationsTrait
               :uniqueness => true,
               :format => { :with => /^[a-zA-Z0-9_\-\.]*$/,
                            :message => "only letters, digits & '_' '-' '.' allowed"  },
-              :length   => { :within => 3..255 }
+              :length   => { :within => 1..255 }
 
     validates :owner, :presence => true
     validate :check_limit