Commit 0123dc36 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Do not authorize project identifier with numbers only (would be interpreted as…

Do not authorize project identifier with numbers only (would be interpreted as the project id in urls).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1108 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 12c0f5f6
......@@ -217,6 +217,7 @@ protected
def validate
errors.add(parent_id, " must be a root project") if parent and parent.parent
errors.add_to_base("A project with subprojects can't be a subproject") if parent and children.size > 0
errors.add(:identifier, :activerecord_error_invalid) if !identifier.blank? && identifier.match(/^\d*$/)
end
private
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment