新增:创建文件对分支长度进行验证

This commit is contained in:
2022-09-06 08:59:24 +08:00
parent 32a9d762d8
commit d03b45eecf

View File

@@ -3,6 +3,8 @@ class Contents::CreateForm < BaseForm
validates :filepath, presence: true
validates :branch, :new_branch, length: { maximum: 50 }
validate :check_branch
def check_branch