GetMessages

public static string GetMessages(this ValidationResults value)
{
    return string.Join(
        Environment.NewLine, 
        value
        .OrderBy(item => item.Message)
        .Select(item => item.Message)
        .ToArray());
}
Example:
MyObject target = new MyObject();
ValidationResults result = Validation.Validate<MyObject>(target);
string validationMessages = result.GetMessages();

Description

Return all messages after call Validate method on Microsoft EnterpriseLibrary Validation Block

Details

Double click on the code to select all.

 

;