How exclusive is meant to use?

Topics: General discussion, Validation Application Block
Oct 12, 2008 at 8:22 AM
Edited Oct 12, 2008 at 8:22 AM
A bit of an embarring question.
How is exclusive meant to be used in validation.I understand Ignore-Inclusive,but cannot find a couple of examples where exclusive make sense.

Could you provide a couple example where you would set exclusive on a property?

Thanks a lot
Oct 12, 2008 at 12:37 PM
Here's an example of using exclusive:
If you have a range validator and set the Lower Bound property to 1 and configure it to be Exclusive, then the number 1 would be invalid.  

Is this what you're asking for?  Or are you asking if there's any case where you can't use inclusive and use exclusive instead?  If that's what you're referring to, well, I also can't think of any advantage of using exclusive over inclusive.  I think it's just a variation so you can define lower or upper bounds in a different way.  I also think that it will prevent programmers from wondering when using it for the first time if the bounds are inclusive or exclusive.
Oct 12, 2008 at 5:52 PM

I just didnt understand exclusive.As simple as that.Am not sure I interpret it right.
I tried to look for some unitTests but could not find any.

So Are you saying that it's just a variation of inclusive?

Inclusive             validate Age 1-20 ok (if you type 0 or 21 is invalid)
Lower bounds=1 inclusive
Upper Bound=20 inclusive

What would you do if  you were to use exclusive or this is not a good example?

I am must be having a bad day sorry.Can't get it.

Oct 13, 2008 at 2:38 PM
If you are to use exclusive and want the numbers 1-20 to be valid, you would set your lower bound to 0 and the upper bound to 21.  Exclusive just means that the numbers set as bounds are "not included" as valid.
Oct 13, 2008 at 3:13 PM
eventually i get it. I totally understand .
Thanks again for explaining