enisn / Xamarin.Forms.InputKit

CheckBox, Radio Button, Labeled Slider, Dropdowns etc.
MIT License
587 stars 100 forks source link

IsValidated filed is always false on FormView #344

Open MarkLFT opened 1 year ago

MarkLFT commented 1 year ago

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):

Smartphone (please complete the following information):

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