Detects error in textbox.