提交 49a8e5f5 编写于 作者: B Bob Van Landuyt

Don't validate reserved words if the format doesn't match

Because it also won't match the sophisticated format we have for
detecting reserved names. We don't want to confuse the user with 2
error messages
上级 3dd2476e
......@@ -198,6 +198,7 @@ class DynamicPathValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
unless value =~ Gitlab::Regex.namespace_regex
record.errors.add(attribute, Gitlab::Regex.namespace_regex_message)
return
end
if path_reserved_for_record?(record, value)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册