From d03b45eecf5f2a4c77846a88b3c18dc343256b89 Mon Sep 17 00:00:00 2001 From: yystopf Date: Tue, 6 Sep 2022 08:59:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=AF=B9=E5=88=86=E6=94=AF=E9=95=BF=E5=BA=A6?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/forms/contents/create_form.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/forms/contents/create_form.rb b/app/forms/contents/create_form.rb index 6a0294887..1e1b0f99f 100644 --- a/app/forms/contents/create_form.rb +++ b/app/forms/contents/create_form.rb @@ -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