Skip to content
Snippets Groups Projects
Commit 317d8b66 authored by Brian Williams's avatar Brian Williams
Browse files

Update error messaging to indicate file extension rather than MIME type

parent 507f5c2f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -2112,7 +2112,7 @@ def signup_email_valid?
def check_username_format
return if username.blank? || Mime::EXTENSION_LOOKUP.keys.none? { |type| username.end_with?(".#{type}") }
 
errors.add(:username, _('ending with MIME type format is not allowed.'))
errors.add(:username, _('ending with a file extension is not allowed.'))
end
 
def groups_with_developer_maintainer_project_access
Loading
Loading
Loading
Loading
@@ -39780,7 +39780,7 @@ msgstr ""
msgid "encrypted: needs to be a :required, :optional or :migrating!"
msgstr ""
 
msgid "ending with MIME type format is not allowed."
msgid "ending with a file extension is not allowed."
msgstr ""
 
msgid "entries cannot be larger than 255 characters"
Loading
Loading
Loading
Loading
@@ -401,7 +401,7 @@
user = build(:user, username: "test.#{type}")
 
expect(user).not_to be_valid
expect(user.errors.full_messages).to include('Username ending with MIME type format is not allowed.')
expect(user.errors.full_messages).to include('Username ending with a file extension is not allowed.')
expect(build(:user, username: "test#{type}")).to be_valid
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment