From 2ef53f89f45ed79825d02648a9f72ac244f2886e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Tue, 17 Dec 2013 16:30:25 +0100 Subject: [PATCH] [0] is shorter than [0,1] :) --- 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 5a273e778d7..3b350d289ea 100644 --- a/app/models/username_validator.rb +++ b/app/models/username_validator.rb @@ -65,7 +65,7 @@ class UsernameValidator def username_first_char_valid? return unless errors.empty? - if username[0,1] =~ /[^A-Za-z0-9]/ + if username[0] =~ /[^A-Za-z0-9]/ self.errors << I18n.t(:'user.username.must_begin_with_alphanumeric') end end