@@ -217,6 +217,7 protected | |||||
217 | def validate |
|
217 | def validate | |
218 | errors.add(parent_id, " must be a root project") if parent and parent.parent |
|
218 | errors.add(parent_id, " must be a root project") if parent and parent.parent | |
219 | errors.add_to_base("A project with subprojects can't be a subproject") if parent and children.size > 0 |
|
219 | errors.add_to_base("A project with subprojects can't be a subproject") if parent and children.size > 0 | |
|
220 | errors.add(:identifier, :activerecord_error_invalid) if !identifier.blank? && identifier.match(/^\d*$/) | |||
220 | end |
|
221 | end | |
221 |
|
222 | |||
222 | private |
|
223 | private |
General Comments 0
You need to be logged in to leave comments.
Login now