progit / progit2

Pro Git 2nd Edition
Other
5.77k stars 1.9k forks source link

Use proper required checkboxes syntax #1699

Closed HonkingGoose closed 3 years ago

HonkingGoose commented 3 years ago

Changes

Context

The old forms are not properly forcing some checkboxes to be ticked before proceeding, this PR makes it so that we properly force the checkboxes. πŸ˜„

Turns out you need to put the required: true value under the option key, not in a separate validations key... πŸ˜„

Example of invalid syntax:

  - type: checkboxes
    attributes:
      label: There's no existing/similar bug report.
      description: Please search to see if an issue already exists for the bug you encountered.
      options:
        - label: I have searched the existing issues
    validations:
      required: true

Example of correct syntax:

  - type: checkboxes
    attributes:
      label: There's no existing/similar bug report.
      description: Please search to see if an issue already exists for the bug you encountered.
      options:
        - label: I have searched the existing issues
          required: true