ValidationHelper.TryValidate Method

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

Overloads

TryValidate(IValidatableObject, ICollectionResult>) Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.
TryValidate(Object, ICollectionResult>) Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.

TryValidate(IValidatableObject, ICollectionResult>)

Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.

public static bool TryValidate(this IValidatableObject instance, ICollection result)

Parameters

instance
System.ComponentModel.DataAnnotations.IValidatableObject
result
System.Collections.Generic.ICollection{System.ComponentModel.DataAnnotations.ValidationResult}

Returns

System.Boolean

TryValidate(Object, ICollectionResult>)

Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.

public static bool TryValidate(object instance, ICollection result)

Parameters

instance
System.Object
result
System.Collections.Generic.ICollection{System.ComponentModel.DataAnnotations.ValidationResult}

Returns

System.Boolean