mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
Merge branch 'develop' of https://git.trustie.net/Gitlink/forgeplus into develop
This commit is contained in:
@@ -3,11 +3,12 @@ class Projects::UpdateForm < BaseForm
|
||||
validates :name, presence: true
|
||||
validates :name, length: { maximum: 50 }
|
||||
validates :description, length: { maximum: 200 }
|
||||
validates :identifier, format: { with: CustomRegexp::REPOSITORY_NAME_REGEX, multiline: true, message: "只能含有数字、字母、下划线且不能以下划线开头和结尾" }
|
||||
|
||||
validate do
|
||||
check_project_category(project_category_id)
|
||||
check_project_language(project_language_id)
|
||||
Rails.logger.info project_identifier
|
||||
Rails.logger.info identifier
|
||||
|
||||
check_repository_name(user_id, identifier) unless identifier.blank? || identifier == project_identifier
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user