From 7a5ce28921200f2ea0c466da286fe7aa52cb3bf9 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 3 Jan 2009 13:09:36 +0000 Subject: [PATCH] Lower the project identifier limit to a minimum of two characters (#2003). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2221 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/project.rb | 2 +- app/views/projects/_form.rhtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index e8d3ed17..c792b9c3 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -60,7 +60,7 @@ class Project < ActiveRecord::Base validates_associated :repository, :wiki validates_length_of :name, :maximum => 30 validates_length_of :homepage, :maximum => 255 - validates_length_of :identifier, :in => 3..20 + validates_length_of :identifier, :in => 2..20 validates_format_of :identifier, :with => /^[a-z0-9\-]*$/ before_destroy :delete_all_members diff --git a/app/views/projects/_form.rhtml b/app/views/projects/_form.rhtml index 860b19fe..f0c9fda5 100644 --- a/app/views/projects/_form.rhtml +++ b/app/views/projects/_form.rhtml @@ -11,7 +11,7 @@

<%= f.text_area :description, :rows => 5, :class => 'wiki-edit' %>

<%= f.text_field :identifier, :required => true, :disabled => @project.identifier_frozen? %> <% unless @project.identifier_frozen? %> -
<%= l(:text_length_between, 3, 20) %> <%= l(:text_project_identifier_info) %> +
<%= l(:text_length_between, 2, 20) %> <%= l(:text_project_identifier_info) %> <% end %>

<%= f.text_field :homepage, :size => 60 %>

<%= f.check_box :is_public %>