diff --git a/app/models/username_validator.rb b/app/models/username_validator.rb index 1ef41e17efa..0dbae4bae6e 100644 --- a/app/models/username_validator.rb +++ b/app/models/username_validator.rb @@ -71,7 +71,7 @@ class UsernameValidator def username_first_char_valid? return unless errors.empty? if username[0] =~ /\W/ - self.errors << I18n.t(:'user.username.must_begin_with_alphanumeric') + self.errors << I18n.t(:'user.username.must_begin_with_alphanumeric_or_underscore') end end diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 281d5365467..4fe2c9cc74f 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -1397,8 +1397,8 @@ en: characters: "must only include numbers, letters and underscores" unique: "must be unique" blank: "must be present" - must_begin_with_alphanumeric: "must begin with a letter or number or an underscore" - must_end_with_alphanumeric: "must end with a letter or number or an underscore" + must_begin_with_alphanumeric_or_underscore: "must begin with a letter, a number or an underscore" + must_end_with_alphanumeric: "must end with a letter or a number" must_not_contain_two_special_chars_in_seq: "must not contain a sequence of 2 or more special chars (.-_)" must_not_end_with_confusing_suffix: "must not end with a confusing suffix like .json or .png etc." email: