From e40241761a491bb7fd9b5ee73337cacdce2042aa Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 4 Apr 2009 09:55:17 +0000 Subject: [PATCH] Set minimum identifier lenght to 1 (#3073). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2646 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 5778966e7..bddd66362 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 => 2..20 + validates_length_of :identifier, :in => 1..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 68fd053d7..e69dfedb0 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, :min => 2, :max => 20) %> <%= l(:text_project_identifier_info) %> +
<%= l(:text_length_between, :min => 1, :max => 20) %> <%= l(:text_project_identifier_info) %> <% end %>

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

<%= f.check_box :is_public %>

-- 2.39.5