Browse Source

新增:提示语locale配置

pull/313/head
yystopf 3 years ago
parent
commit
a438ab6f3e
2 changed files with 6 additions and 1 deletions
  1. +1
    -1
      app/forms/contents/create_form.rb
  2. +5
    -0
      config/locales/forms/create_file_form.zh-CN.yml

+ 1
- 1
app/forms/contents/create_form.rb View File

@@ -3,7 +3,7 @@ class Contents::CreateForm < BaseForm


validates :filepath, presence: true validates :filepath, presence: true


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


validate :check_branch validate :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