Esempio n. 1
0
        private static IEnumerable <string> Validate(object model)
        {
            var ctx = new ValidationContext(model, null, null);

            var attr   = new ValidateObjectAttribute();
            var result = attr.GetValidationResult(model, ctx);

            return(RecursiveValidator.ExpandResults(result));
        }