取消描述是否为空的验证

This commit is contained in:
sw 2014-12-15 15:19:03 +08:00
parent cf2810f1c6
commit 9280da5b61
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ class Course < ActiveRecord::Base
acts_as_attachable :view_permission => :view_course_files,
:delete_permission => :manage_files
validates_presence_of :password, :term,:name,:description
validates_presence_of :password, :term,:name
validates_format_of :class_period, :with =>/^[1-9]\d*$/
validates_format_of :name,:with =>/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/
validates_length_of :description, :maximum => 10000