Browse Source

Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop

pull/313/head
“xxq250” 3 years ago
parent
commit
4a08c9be88
2 changed files with 7 additions and 0 deletions
  1. +2
    -0
      app/forms/contents/create_form.rb
  2. +5
    -0
      config/locales/forms/create_file_form.zh-CN.yml

+ 2
- 0
app/forms/contents/create_form.rb View File

@@ -3,6 +3,8 @@ class Contents::CreateForm < BaseForm

validates :filepath, presence: true

validates :new_branch, length: { maximum: 100, too_long: "过长,仅支持%{count}的长度"}

validate :check_branch

def check_branch


+ 5
- 0
config/locales/forms/create_file_form.zh-CN.yml View File

@@ -0,0 +1,5 @@
'zh-CN':
activemodel:
attributes:
contents/create_form:
new_branch: 分支名称

Loading…
Cancel
Save