Range Validator Negative Integer

Topics: Validation Application Block
Feb 18, 2009 at 3:42 PM
Has anyone tried to use the Range Validator with a range that can include negative integer?  For example -100 to 100 inclusive?  We get an error that the lower bound must be less than the upper bound?
Are we doing something incorrect?
Feb 19, 2009 at 6:32 AM
Hi,

I'm not sure if this is a bug, we'll try to confirm this behavior to entlib team and get back to you. However, i found a workaround that seem to work. I tried setting a higher value for the upperbound. In your sample values, I set the 100 to 101. and seem to work.

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com
Feb 20, 2009 at 1:34 AM
FYI we have the same issue with decimals as well.
Feb 20, 2009 at 2:18 AM
Edited Feb 20, 2009 at 2:28 AM
Another workaround would be to let the lowerBound in the configuration editor to be set to Ignore.  And then just modify it to Inclusive or Exclusive in the xml editor.  I've logged an issue for this - http://www.codeplex.com/entlib/WorkItem/View.aspx?WorkItemId=21285


Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com