add validation and style to the error messages