コード例 #1
0
 /// <summary>
 /// Gets the validation message.
 /// </summary>
 public static string ValidationMessage(this IValidatable input)
 {
     return(input.ValidationResult().Message);
 }
コード例 #2
0
 public static string ValidationMessage(this IValidatable input)
 {
     // Other times you just want the message. This is much more rare.
     return(input.ValidationResult().Message);
 }
コード例 #3
0
 /// <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);
 }
コード例 #4
0
 public static bool IsValid(this IValidatable input)
 {
     // Sometimes all you care about is a boolean
     return(input.ValidationResult().Success);
 }