Exemplo n.º 1
0
        public static bool IsValid(this IValidatable validatableObject, out ValidationCollection validations)
        {
            validatableObject.ThrowIfNull(nameof(validatableObject));

            validations = new ValidationCollection();
            validatableObject.Validate(validations);
            return(validations.IsValid);
        }
Exemplo n.º 2
0
 public static bool IsValid(this IValidatable validatableObject)
 {
     validatableObject.ThrowIfNull(nameof(validatableObject));
     return(validatableObject.IsValid(out ValidationCollection _));
 }