rcv icon indicating copy to clipboard operation
rcv copied to clipboard

Single source of truth for CVR states: required, optional, and disallowed

Open artoonie opened this issue 2 years ago • 0 comments

Providers take options, and those options have a few states:

  1. Required
  2. Optional
  3. 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.

artoonie avatar May 21 '23 18:05 artoonie