Validate the string to be encoded.