FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
122 stars 18 forks source link

Form Validation for DropDown widgets fails when I turn on Add Option Label #1982

Open marcelostockle opened 10 months ago

marcelostockle commented 10 months ago

Has your issue been reported?

Current Behavior

Form validation for empty DropDown fields works as intended UNTIL I turn on [Add Option Label]. At this point, even when the app finds that the Widget State is empty, validation succeeds unexpectedly.

Expected Behavior

Validate Form should fail (and stop an Action Chain) if a controlled DropDown has no option selected. This will only work as intended when [Add Option Label] is off.

Steps to Reproduce

  1. Create a page
  2. Insert a Form Validation widget
  3. Insert a DropDown widget within and turn on Add Option Labels
  4. Set up Automatic Validation in the Form Validation widget. Turn on validation for the Dropdown.
  5. Finally, insert a submit button. Give it the following Action chain for testing purposes: [Validate Form], followed by [Alert Dialog].
  6. Run

If you see the Alert Dialog, you can verify that [Validate Form] won't stop the Action chain.

Reproducible from Blank

Bug Report Code (Required)

IT5XlMjfsIhgod9G0M+MbcJagioRJl87argrle0aa0g1GJCvOrQiPczuT3BZOMu6dFZUP2GJmm0z+vDWud7PFPk3GByJY75x/qpcYA7/UniXRbanDKi/PEFSEtFVGly7zpuZuhR5JrBiL0YN3Duxe+nLaDTvNZjwPDE7PvmLB9rX+mykLXnOGn0Jg1ZSfCvr

Context

A DropDown widget where I can select one of a group of users. The labels are names, but the values should be DocumentReferences

Visual documentation

Screenshot 2023-12-07 172416 Screenshot 2023-12-07 172458

Additional Info

No response

Environment

- FlutterFlow version: 4.0
- Platform: Web
- Browser name and version: Edge Version 119.0.2151.97 (64-bit)
- Operating system and version affected: Windows 11
github-actions[bot] commented 10 months ago

This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue.

ready4sea commented 9 months ago

I encounter the same issue. Form validation encapsulates a dropdown and is set to validate said dropdown

image

However, when I trigger the form validation, it goes through even though no selection was made.

github-actions[bot] commented 8 months ago

This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue.

ready4sea commented 8 months ago

Any news regarding this ticket ? It would be sad if it were closed without even looking into it.

Franco98404 commented 8 months ago

I have the same problem

JoaquinMendoza28 commented 8 months ago

I am experiencing the same issue.

VictorHugoZB commented 7 months ago

Same issue here

itwrites commented 7 months ago

Same

rzambroni commented 6 months ago

Hi everyone! So sorry for the delay in the response, we are trying to get up to speed with every reported issue. I was able to confirm this issue and will send it to the team so they can take a look.

Once it is fixed we will update the status here. Thanks!