summaryrefslogtreecommitdiff
path: root/app/models/packages/package.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-02 18:23:43 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-02 18:23:43 +0000
commitb8110282a17d805dc28fb94f2d62f164bd1c3665 (patch)
tree722c853c14f1eff27ae260f2ad331c219b3ddd63 /app/models/packages/package.rb
parentbfbbc52faaae2a1a06e065511a1a8661203e868a (diff)
downloadgitlab-ce-b8110282a17d805dc28fb94f2d62f164bd1c3665.tar.gz
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'app/models/packages/package.rb')
-rw-r--r--app/models/packages/package.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/packages/package.rb b/app/models/packages/package.rb
index bda11160957..48c40750db2 100644
--- a/app/models/packages/package.rb
+++ b/app/models/packages/package.rb
@@ -37,6 +37,7 @@ class Packages::Package < ApplicationRecord
validate :package_already_taken, if: :npm?
validates :version, format: { with: Gitlab::Regex.semver_regex }, if: -> { npm? || nuget? }
validates :name, format: { with: Gitlab::Regex.conan_recipe_component_regex }, if: :conan?
+ validates :name, format: { with: Gitlab::Regex.nuget_package_name_regex }, if: :nuget?
validates :version, format: { with: Gitlab::Regex.conan_recipe_component_regex }, if: :conan?
validates :version, format: { with: Gitlab::Regex.maven_version_regex }, if: -> { version? && maven? }
validates :version, format: { with: Gitlab::Regex.pypi_version_regex }, if: :pypi?