Without this patch, Ruby 1.8's Hash#to_s behaviour causes [{1=>2}] to be treated as "12" when validating values.