add: issues description and journals notes validate

This commit is contained in:
2022-05-06 09:56:22 +08:00
parent 7c88ea3d67
commit ae7d0d1329
7 changed files with 38 additions and 8 deletions

View File

@@ -0,0 +1,7 @@
class Journals::CreateForm
include ActiveModel::Model
attr_accessor :notes
validates :notes, length: { maximum: 65535, too_long: "不能超过65535个字符"}
end

View File

@@ -0,0 +1,8 @@
class Journals::UpdateForm
include ActiveModel::Model
attr_accessor :notes
validates :notes, length: { maximum: 65535, too_long: "不能超过65535个字符"}
end