流水线字段校验

This commit is contained in:
moshenglv 2021-01-19 14:00:22 +08:00
parent 703be3f9a1
commit 1001d10017
1 changed files with 1 additions and 0 deletions

View File

@ -16,6 +16,7 @@
class Ci::Pipeline < Ci::LocalBase
validates :pipeline_name, presence: {message: "流水线名称不能为空"}
validates :file_name, presence: {message: "流水线文件名称不能为空"}
validates :identifier, presence: {message: "项目identifier不能为空"}
has_many :pipeline_stages, -> { reorder(show_index: :asc) }, foreign_key: "pipeline_id", :class_name => 'Ci::PipelineStage', dependent: :destroy