/// <summary> /// If there are any error in the object it returns false; /// </summary> public static bool IsValid(this IValidable validable) { bool isValid = true; try { validable.GetValidationResult(Level.Empty); } catch (Validation.ValidationException) { isValid = false; } return(isValid); }
/// <summary> /// Gets the complete validation result of the object. /// </summary> public static ValidationResultBase GetValidationResult(this IValidable validable) { return(validable.GetValidationResult(Level.Max)); }