[0] is shorter than [0,1] :)
This commit is contained in:
parent
ea307931a7
commit
2ef53f89f4
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue