rcv
rcv copied to clipboard
Single source of truth for CVR states: required, optional, and disallowed
Providers take options, and those options have a few states:
- Required
- Optional
- Disallowed
Required fields have validity checks (bounds, etc). Optional fields have those same checks.
The functions fieldOutOfRangeOrNotInteger and fieldIsDefinedButShouldNotBeForProvider are checked in a complex nesting of conditionals in performBasicCvrSourceValidation. These checks correspond to the checks in GuiConfigController.java.
Task: create a single source of truth for which providers require which fields, and use that information both in ContestConfig.java:performBasicCvrSourceValidation and in GuiConfigController.java:buttonCvrFilePathClicked.