When validating boolean properties using FluentValidation, use .NotNull() instead of .NotEmpty()
The reason behind this is NotEmpty() will consider only true as valid property whereas NotNull() will consider both true and false as valid properties.
Cheers
Samitha
The reason behind this is NotEmpty() will consider only true as valid property whereas NotNull() will consider both true and false as valid properties.
Cheers
Samitha
No comments:
Post a Comment