测试唯一

chromesetting
daiao 5 years ago
parent 1f5994f62a
commit 8a8b425b58

@ -1,6 +1,6 @@
class HackSet < ApplicationRecord
validates :input, presence: { message: "测试集输入不能为空" }
validates :output, uniqueness: { message: "测试集输出不能为空" }
validates :output, presence: { message: "测试集输出不能为空" }
# 编程题测试集
belongs_to :hack
end

Loading…
Cancel
Save