I recently created a form containing a dropdown input field with a few selection options. The last option in the list is "Other". When this option is selected, we display a text input field and also require it with form submission. I noticed while testing that changing the dropdown selection to a non-required value, the form persists a required error. See below.
[--- Setup ---]
Create a form with two inputs.
- A dropdown input asking for favorite type of pancakes: Plain, Blueberry, and Other.
- A conditionally required text field, only required when pancake dropdown selection is "Other".
[--- Steps to reproduce error ---]
- Select "Other" for the pancake dropdown.
- Click in and out of text field (no data entry).
- Select "Blueberry" for the pancake dropdown.
- Submit form.
Expected: Form submits successfully.
Actual: Form submission fails. Error message = "Some form inputs are invalid!"