新增:创建文件对分支长度进行验证
This commit is contained in:
parent
32a9d762d8
commit
d03b45eecf
|
@ -3,6 +3,8 @@ class Contents::CreateForm < BaseForm
|
||||||
|
|
||||||
validates :filepath, presence: true
|
validates :filepath, presence: true
|
||||||
|
|
||||||
|
validates :branch, :new_branch, length: { maximum: 50 }
|
||||||
|
|
||||||
validate :check_branch
|
validate :check_branch
|
||||||
|
|
||||||
def check_branch
|
def check_branch
|
||||||
|
|
Loading…
Reference in New Issue