mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
add: issues description and journals notes validate
This commit is contained in:
7
app/forms/journals/create_form.rb
Normal file
7
app/forms/journals/create_form.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
class Journals::CreateForm
|
||||
include ActiveModel::Model
|
||||
|
||||
attr_accessor :notes
|
||||
|
||||
validates :notes, length: { maximum: 65535, too_long: "不能超过65535个字符"}
|
||||
end
|
||||
8
app/forms/journals/update_form.rb
Normal file
8
app/forms/journals/update_form.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
class Journals::UpdateForm
|
||||
include ActiveModel::Model
|
||||
|
||||
attr_accessor :notes
|
||||
|
||||
validates :notes, length: { maximum: 65535, too_long: "不能超过65535个字符"}
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user