On Dec 5, 2010, at 3:22 PM, Luis Díaz wrote:
> in the following statement:
> 
> db.producto.stock.requires = IS_INT_IN_RANGE(0, 999, error_message='Error')
> 
> value of 999 in stock returns me error.
> only works with maximum values of 998
> 
> in gluon.validators
> in line 588:
> elif self.minimum <= value <self.maximum:
> 
> should be
> elif self.minimum <= value <= self.maximum:
> 
> Maybe this behavior is expected and I just need to adjust to IS_INT_IN_RANGE 
> (0, 1000, error_message = 'Error')
> 

That's correct. The intention is to correspond to the Python idea of a range, 
as in range(), where the upper bound is not part of the set. 

Reply via email to