@@ -63,6 +63,8 class Project < ActiveRecord::Base | |||
|
63 | 63 | validates_length_of :identifier, :in => 1..20 |
|
64 | 64 | # donwcase letters, digits, dashes but not digits only |
|
65 | 65 | validates_format_of :identifier, :with => /^(?!\d+$)[a-z0-9\-]*$/, :if => Proc.new { |p| p.identifier_changed? } |
|
66 | # reserved words | |
|
67 | validates_exclusion_of :identifier, :in => %w( new ) | |
|
66 | 68 | |
|
67 | 69 | before_destroy :delete_all_members |
|
68 | 70 |
General Comments 0
You need to be logged in to leave comments.
Login now