When using validations InView and we use MVVM from WKT 7.1.2 we get the following exception
System.InvalidCastException: Unable to cast object of type 'System.ComponentModel.DataAnnotations.ValidationResult' to type 'System.String'.
The problem is that GetErrros return a enumeration of ValidationResult defined in System.ComponentModel.DataAnnotations
System.Collections.IEnumerable GetErrors(string propertyName)
It appears if you doing an explicit cast for the elements to string... like this (string)obj. Maybe it should be better to use ToString() or cater for
ValidationResult
For more info regarding the MVVM from the toolkit see
WindowsCommunityToolkit/ObservableValidator.cs at main · CommunityToolkit/WindowsCommunityToolkit (github.com)
Thanks
Stephanus