Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/validators/branch_filter_validator.rb')
-rw-r--r--app/validators/branch_filter_validator.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/validators/branch_filter_validator.rb b/app/validators/branch_filter_validator.rb
index 6a0899be850..89d6343a9a4 100644
--- a/app/validators/branch_filter_validator.rb
+++ b/app/validators/branch_filter_validator.rb
@@ -20,11 +20,11 @@ class BranchFilterValidator < ActiveModel::EachValidator
value_without_wildcards = value.tr('*', 'x')
unless Gitlab::GitRefValidator.validate(value_without_wildcards)
- record.errors[attribute] << "is not a valid branch name"
+ record.errors.add(attribute, "is not a valid branch name")
end
unless value.length <= 4000
- record.errors[attribute] << "is longer than the allowed length of 4000 characters."
+ record.errors.add(attribute, "is longer than the allowed length of 4000 characters.")
end
end
end