Skip to content

IsValidated filed is always false on FormView #344

Open
@MarkLFT

Description

@MarkLFT

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions