|
|
|
@ -2,7 +2,7 @@ class ShixunInfo < ApplicationRecord
|
|
|
|
|
belongs_to :shixun
|
|
|
|
|
validates_uniqueness_of :shixun_id
|
|
|
|
|
validates_length_of :fork_reason, maximum: 60, message: "不能超过60个字符"
|
|
|
|
|
validates_presence_of :evaluate_script, message: "实训脚本不能为空"
|
|
|
|
|
# validates_presence_of :evaluate_script, message: "实训脚本不能为空"
|
|
|
|
|
after_commit :create_diff_record
|
|
|
|
|
|
|
|
|
|
validates :description, length: { maximum: 5000, too_long: "不能超过5000个字符" }
|
|
|
|
|