Merge pull request '修改CLA验证条件' (#59) from KingChan/forgeplus:chenjing into standalone_develop

This commit is contained in:
KingChan 2023-06-14 10:47:47 +08:00
commit 43c2879f65
1 changed files with 1 additions and 1 deletions

View File

@ -2,5 +2,5 @@ class Organizations::CreateClaForm < BaseForm
KEY_REGEX = /^(?!_)(?!.*?_$)[a-zA-Z0-9_-]+$/ #只含有数字、字母、下划线不能以下划线开头和结尾
attr_accessor :name, :key, :content, :organization_id, :pr_need
validates :name, :organization_id , :key, presence: true
validates :name, format: { with: KEY_REGEX, multiline: true, message: "只能含有数字、字母、下划线且不能以下划线开头和结尾" }
validates :key, format: { with: KEY_REGEX, multiline: true, message: "只能含有数字、字母、下划线且不能以下划线开头和结尾" }
end