Updated the form with error messages for the required fields.