luismts / ValidationRulesPlugin

Create and validate property rules for all your Xamarin and Windows apps and improve the quality of your data.
https://luismts.com/
MIT License
68 stars 26 forks source link

Not able to set the entry value from View model #9

Closed viveklpu2011 closed 3 years ago

viveklpu2011 commented 3 years ago

Not able to set the entry value programatically , meanse i want to fill entry from view model from validation object

luismts commented 3 years ago

I never tried but I think you can do it. The validatableobject already implements PropertyChange.

viveklpu2011 commented 3 years ago

I have tried but not working

luismts commented 3 years ago

Can you show a snippet?

viveklpu2011 commented 3 years ago
            var contact = await Contacts.PickContactAsync();

            if (contact == null)
                return;

            customerViewModel.CustomerName.Value = contact?.DisplayName;
            customerViewModel.CustomerPhone.Value = contact?.Phones[0]?.PhoneNumber;

Value is not showing in entry

luismts commented 3 years ago

Sorry, I can't reproduce this. It's working on my side.

You can see an example here.