fix lint error, rearrange error message and emphasize invalid characters