Show error message when an invalid pattern is given