forked from Trustie/forgeplus
更改:action_node_input唯一性验证
This commit is contained in:
parent
dd9e1e3123
commit
db8bbe1c36
|
|
@ -25,6 +25,6 @@ class Action::NodeInput < ApplicationRecord
|
|||
|
||||
belongs_to :action_node, :class_name => 'Action::Node', foreign_key: "action_nodes_id"
|
||||
|
||||
validates :name, presence: { message: "不能为空" }, uniqueness: true
|
||||
validates :name, presence: { message: "不能为空" }, uniqueness: { scope: :action_nodes_id }
|
||||
validates :description, length: { maximum: 65535, too_long: "不能超过65535个字符"}
|
||||
end
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class Action::NodeSelect < ApplicationRecord
|
|||
belongs_to :action_node, :class_name => 'Action::Node', foreign_key: "action_nodes_id"
|
||||
belongs_to :user, optional: true
|
||||
|
||||
validates :name, presence: { message: "不能为空" }, uniqueness: true
|
||||
validates :name, presence: { message: "不能为空" }, uniqueness: { scope: :action_nodes_id }
|
||||
validates :description, length: { maximum: 65535, too_long: "不能超过65535个字符"}
|
||||
|
||||
def value
|
||||
|
|
|
|||
Loading…
Reference in New Issue