新建竞赛时奖励设置为不能为空
This commit is contained in:
parent
b4ee106ce9
commit
431b4541c3
|
@ -24,7 +24,7 @@ class Contest < ActiveRecord::Base
|
|||
|
||||
validates_length_of :name, :maximum => NAME_LENGTH_LIMIT
|
||||
validates_length_of :description, :maximum => DESCRIPTION_LENGTH_LIMIT
|
||||
validates_presence_of :author_id, :name, :deadline
|
||||
validates_presence_of :author_id, :name, :deadline,:budget
|
||||
validates_format_of :deadline, :with => /^[\d]{4}[-][\d]{1,2}[-][\d]{1,2}$/
|
||||
# validates_format_of :budget, :with => /^(\d+)$|^(\d+).([0-9]{2})|^(\d+).([0-9]{1})$/
|
||||
validate :validate_user
|
||||
|
|
Loading…
Reference in New Issue