Skip to content

Use proper required checkboxes syntax#1699

Merged
ben merged 1 commit intoprogit:mainfrom
HonkingGoose:chore/improve-forms-required-checkboxes
Aug 15, 2021
Merged

Use proper required checkboxes syntax#1699
ben merged 1 commit intoprogit:mainfrom
HonkingGoose:chore/improve-forms-required-checkboxes

Conversation

@HonkingGoose
Copy link
Copy Markdown
Contributor

@HonkingGoose HonkingGoose commented Aug 9, 2021

Changes

  • Use proper required checkboxes syntax

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

@ben ben merged commit f829ea7 into progit:main Aug 15, 2021
@HonkingGoose HonkingGoose deleted the chore/improve-forms-required-checkboxes branch August 15, 2021 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants