make validator compatible with Ruby 1.8

Ruby 1.8 provides the integer code of the character when using an array lookup on a string