adding error messages to the form fields