raises flash message when a word has errors