mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 22:26:26 +08:00
FIX: Allow trailing _
because we used to.
This commit is contained in:
parent
9548876c2d
commit
b3d2982be7
|
@ -75,7 +75,7 @@ class UsernameValidator
|
||||||
|
|
||||||
def username_last_char_valid?
|
def username_last_char_valid?
|
||||||
return unless errors.empty?
|
return unless errors.empty?
|
||||||
if username[-1] =~ /[^A-Za-z0-9]/
|
if username[-1] =~ /[^A-Za-z0-9_]/
|
||||||
self.errors << I18n.t(:'user.username.must_end_with_alphanumeric')
|
self.errors << I18n.t(:'user.username.must_end_with_alphanumeric')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user