views:

179

answers:

2

this is the method definition:

public static bool TryValidateObject(
Object instance,
ValidationContext validationContext,
ICollection<ValidationResult> validationResults,
bool validateAllProperties

)

what i am confused is the validateAllProperties parameter, I understand when it is true-validate all properties.

What about when it is false, not validate all properties, but which property will be validated?

A: 

I also don't fully understand it but after struggling with Unit Testing custom validators written by me I noticed one interresting thing.

When I launched my tests without this parameter (so by default it was false), my custom validators were omitted! if I set it to true, they were taken into account in my tests and now I can happily continue TDD. Hope this helps you a bit.

maciejgren
this is also what i got, so i asked question about the parameter.
Benny