Add option to use the text value for the error msg