[0] is shorter than [0,1] :)

This commit is contained in:
Régis Hanol 2013-12-17 16:30:25 +01:00
parent ea307931a7
commit 2ef53f89f4
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ class UsernameValidator
def username_first_char_valid? def username_first_char_valid?
return unless errors.empty? 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') self.errors << I18n.t(:'user.username.must_begin_with_alphanumeric')
end end
end end