Bug In NullRule Class

Jun 14, 2012 at 5:27 PM

Hi,

I have download latest code version 14528. I have found a bug in NullRule class. It's not working on when an object is set for MustBeNull(). The condition is not correct. Kindly look into it and share your thoughts. 

actual code is given below

 if (value != null)
                return ValidationResult.Success;
            else
                return ValidationResult.Fail();

corrected code will be 

 if (value == null)
                return ValidationResult.Success;
            else
                return ValidationResult.Fail();

Coordinator
Jun 17, 2012 at 2:53 AM

Hi,

Absolutely right! I have fixed the bug (changeset 15657). Download release 2.1 again for a patched release.

Thanks for letting us know.