UsernameValidator error messages weren't matching the code
This commit is contained in:
parent
283ff4c7f8
commit
e204144a58
|
@ -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
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue