using ReactiveUI; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Text; namespace UserInterface.ViewModels { public class ViewModelBase : ReactiveObject { public bool IsValid(T obj, out ICollection results) { results = new List(); return Validator.TryValidateObject(obj, new ValidationContext(obj), results, true); } } }