When the general information form is submitted, it passes through two layers of validation. The first is with the Django form object, and related errors are passed back to the user properly. The second is schema validation. If the schema check fails, it will reload the form for the user with the wrong data.
Errors are passed in Django context, but are not displayed to the user. So, we just get a "Hey there are errors" with no further information.
The date will be improperly formatted. We convert them before running the schema validation, and don't convert back before displaying to the user.
Enter anything that would cause a schema error, but not a form error. Such as:
i. Select Audit period -> Other
ii. Enter a single digit audit period, such as 7
Verify that an error occurs, and the form comes back with:
a. No/wrong inputted information
b. Incorrectly formatted dates
Expected Behavior
Navigate to the general information form
Enter anything that would cause a schema error, but not a form error. Such as:
i. Select Audit period -> Other
ii. Enter a single digit audit period, such as 7
An error should still occur, but it should be displayed to the user. Ideally at the field where the error happened, or at the top of the page below the "There are errors" message.
The dates should be correct. So, they should be converted back to MM/DD/YYYY or pulled from earlier before displaying them to the user.
Screenshots
The generic error message displays with no specifics, and the dates are formatted incorrectly. So, users may believe the dates are the problem.
Describe the bug
When the general information form is submitted, it passes through two layers of validation. The first is with the Django form object, and related errors are passed back to the user properly. The second is schema validation. If the schema check fails, it will reload the form for the user with the wrong data.
With issues 1 and 2 combined, we've had a few cases where the error appears to be the date field, which is frustrating for users. See this ZenDesk ticket: https://fac-gov.zendesk.com/agent/tickets/3749, issue https://github.com/GSA-TTS/FAC/issues/3969
Steps to reproduce the bug
7
Expected Behavior
7
Screenshots
The generic error message displays with no specifics, and the dates are formatted incorrectly. So, users may believe the dates are the problem.
System setup
No response
Additional context
No response
Code of Conduct