FIX 修复易修标题过长导致排版问题

This commit is contained in:
jasder
2021-05-08 14:13:16 +08:00
4 changed files with 66 additions and 40 deletions

View File

@@ -0,0 +1,11 @@
class Issues::CreateForm
include ActiveModel::Model
attr_accessor :subject
validates :subject, presence: { message: "不能为空" }
validates :subject, length: { maximum: 80, too_long: "不能超过80个字符" }
end

View File

@@ -0,0 +1,10 @@
class Issues::UpdateForm
include ActiveModel::Model
attr_accessor :subject
validates :subject, presence: { message: "不能为空" }
validates :subject, length: { maximum: 80, too_long: "不能超过80个字符" }
end