Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsValidated filed is always false on FormView #344

Open
MarkLFT opened this issue Mar 28, 2023 · 0 comments
Open

IsValidated filed is always false on FormView #344

MarkLFT opened this issue Mar 28, 2023 · 0 comments
Labels
question Further information is requested

Comments

@MarkLFT
Copy link

MarkLFT commented Mar 28, 2023

Describe the bug
I am using a FormView and have used a binding to a bool ObservableProperty in the ViewModel to the IsValidated property. But in the ViewModel the value is always false, even when no warnings on the form.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Maui ContentView.
  2. Assign the View to a ContentPage.
  3. Assign the ViewModel to the ContentPage.
  4. In the ViewModel create an observableproperty of type bool and name IsValidated.
  5. In the ContextView create a FormView and set the IsValidated property to "{Binding IsValidated}"
  6. Add a TextField to the form with validation for RequiredValidation.
  7. On running the app, if the text field is empty, I see the Required warning, if the text field has content the warning disappears as expected. However in both case on clicking the Submit button, the property in the VM called IsValidating is always false.

Expected behavior
IsValidated property in the ViewModel should show true when there are no issues on the form.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser Chrome
  • Version 111.0.5563.111

Smartphone (please complete the following information):

  • Device: Samsung s8
  • OS: Android
  • Browser Built-in
  • Version

Additional context
Problem tested in emulators. API 33 Pixel 5 Android 13

@enisn enisn added the question Further information is requested label Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants