From b3d2982be7d40ff632afcd1c3cbe8c9e78a632be Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 9 Sep 2015 14:06:36 -0400 Subject: [PATCH] FIX: Allow trailing `_` because we used to. --- app/models/username_validator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/username_validator.rb b/app/models/username_validator.rb index b93ef78a03e..ac9adcc95e9 100644 --- a/app/models/username_validator.rb +++ b/app/models/username_validator.rb @@ -75,7 +75,7 @@ class UsernameValidator def username_last_char_valid? 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') end end