Hello,
Excuse me, if I'm conceptually wrong but shouldn't validator check that target instance is not null?
As far as I can see in code, the check is being made only in explicit IValidator.Validate method implementation, and if the following test is added to AbstractValidatorTester, it fails:
```
[Test]
public void When_instanse_is_null_Should_throw_argumentnullexception() {
typeof(ArgumentNullException).ShouldBeThrownBy(() =>
validator.Validate((Person)null));
}
```
P.S.
Actually, I was wondering how to validate the target itself against Null in addition to property validation rules, but failed to figure out while reading the documentation and browsing the samples. Could you please share the best approach?
Thanks.
Comments: Thank you, Jeremy
Excuse me, if I'm conceptually wrong but shouldn't validator check that target instance is not null?
As far as I can see in code, the check is being made only in explicit IValidator.Validate method implementation, and if the following test is added to AbstractValidatorTester, it fails:
```
[Test]
public void When_instanse_is_null_Should_throw_argumentnullexception() {
typeof(ArgumentNullException).ShouldBeThrownBy(() =>
validator.Validate((Person)null));
}
```
P.S.
Actually, I was wondering how to validate the target itself against Null in addition to property validation rules, but failed to figure out while reading the documentation and browsing the samples. Could you please share the best approach?
Thanks.
Comments: Thank you, Jeremy