Adjustreact
cxt 5 years ago
parent ffb5939a08
commit a5ed9c1f19

@ -4,7 +4,7 @@ class LiveLink < ApplicationRecord
has_many :tidings, as: :container, dependent: :destroy has_many :tidings, as: :container, dependent: :destroy
validates :url, format: { with: CustomRegexp::URL, message: "必须为网址超链接" } # validates :url, format: { with: CustomRegexp::URL, message: "必须为网址超链接" }
validates :description, length: { maximum: 100, too_long: "不能超过100个字符" } validates :description, length: { maximum: 100, too_long: "不能超过100个字符" }
validates :course_name, presence: true validates :course_name, presence: true
validates :platform, presence: true validates :platform, presence: true

Loading…
Cancel
Save