/// <summary> /// Gets the validation message. /// </summary> public static string ValidationMessage(this IValidatable input) { return(input.ValidationResult().Message); }
public static string ValidationMessage(this IValidatable input) { // Other times you just want the message. This is much more rare. return(input.ValidationResult().Message); }
/// <summary> /// Gets the validation result. /// </summary> /// <returns>True if validation is successful, false otherwise.</returns> public static bool IsValid(this IValidatable input) { return(input.ValidationResult().Success); }
public static bool IsValid(this IValidatable input) { // Sometimes all you care about is a boolean return(input.ValidationResult().Success); }