You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
This issue only relates to a single bug. I will open new issues for any other problems.
Describe the bug
In Fyne version 2.4.5, the dialog form validation behavior has changed compared to version 2.2.0. In version 2.2.0, the form remains invalid until all input fields are valid. However, in version 2.4.5, the form becomes valid if at least one input field is valid, which is not the expected behavior.
How to reproduce
Create a form with multiple input fields. (dialog.NewForm)
Set up validation for each field.
Run the application using Fyne version 2.4.5.
Observe that the form is marked as valid if at least one input field is valid.
Jacalz
changed the title
Validation bug: Form becomes valid if one input field is valid
Form dialog validation becomes valid if one input field is valid
Jul 18, 2024
This is a known bug that only affects the form dialog, related to the solution for #4147 apparently triggering some bug inside the .SetOnValidationChanged() handling inside the form widget. I’ve looked into it but haven’t found the underlying reason that it happens. I think it is time to work around this issue until a real fix is in place.
PS: Please provide a simpler code example and not a snippet from another project, per the issue template. Example code should be as simple as possible and a single package main file that can just be copied over and run directly by us maintainers.
Checklist
Describe the bug
In Fyne version 2.4.5, the dialog form validation behavior has changed compared to version 2.2.0. In version 2.2.0, the form remains invalid until all input fields are valid. However, in version 2.4.5, the form becomes valid if at least one input field is valid, which is not the expected behavior.
How to reproduce
dialog.NewForm
)Screenshots
Empty Dialog Form (version 2.4.5)
![Screenshot from 2024-07-18 08-07-23](https://private-user-images.githubusercontent.com/108367944/349834767-69b8ebaa-1386-4257-9220-9ac7ae5b5b0d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUxMTY1MDIsIm5iZiI6MTcyNTExNjIwMiwicGF0aCI6Ii8xMDgzNjc5NDQvMzQ5ODM0NzY3LTY5YjhlYmFhLTEzODYtNDI1Ny05MjIwLTlhYzdhZTViNWIwZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODMxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgzMVQxNDU2NDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jNGQ0Yzk4ZmFjMmNlNWY5ZTRhMmE0ZjJkOGExYjJkNzFmMWUxZGRhZDJhZDM0YmIxOTk1MjZlMWFlZTg2M2EyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.t_yppPILW40YIdfYoWu4RTaKzwOazMIHmAmBk_GtUOg)
Valid Form, with one valid input (version 2.4.5)
![Screenshot from 2024-07-18 08-07-35](https://private-user-images.githubusercontent.com/108367944/349834922-a340ce16-d00e-40e2-8652-0cbd27f06874.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUxMTY1MDIsIm5iZiI6MTcyNTExNjIwMiwicGF0aCI6Ii8xMDgzNjc5NDQvMzQ5ODM0OTIyLWEzNDBjZTE2LWQwMGUtNDBlMi04NjUyLTBjYmQyN2YwNjg3NC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODMxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgzMVQxNDU2NDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hYWUxOTYzYzYyZmE3NzljYWEwZTQ5MWVlYmZiOWFlOGYzZGU1NGI3OGZhOGJiMTQ1NjU5YzAyOTliNDY3YTViJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.m_Sc9Bepcj1lUwKnE8sk4t6PLQd0rphrA1LMRu5a9IU)
Invalid Form, with on valid input (version 2.2.0)
![Screenshot from 2024-07-18 08-08-29](https://private-user-images.githubusercontent.com/108367944/349835945-c4f66b92-db0e-4462-b0df-7300be98d73a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUxMTY1MDIsIm5iZiI6MTcyNTExNjIwMiwicGF0aCI6Ii8xMDgzNjc5NDQvMzQ5ODM1OTQ1LWM0ZjY2YjkyLWRiMGUtNDQ2Mi1iMGRmLTczMDBiZTk4ZDczYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODMxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgzMVQxNDU2NDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jMzIwZTBkN2MzNGM1Yzg0NWVjYzkzYzQ5ZGQzZGM5NTg1MGZjZGI4NjM5YzZmYWI2MjFhYTQxOTRhZjk5ZWZmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.Sw2l18pArjPMwC2cKy3HGk_AhY1yo24GSzUJWnUqrLM)
Example code
The complete project can be found on my GitHub Page.
The function to create the Dialog Form, in
toolbar.go
:Fyne version
2.4.5
Go compiler version
1.22.4
Operating system and version
Ubuntu 22.04.4 LTS
Additional Information
No response
The text was updated successfully, but these errors were encountered: