• 2835 views
  • 0 comments
  • loading...

IS_DECIMAL_IN_RANGE converts the input into a Python Decimal or generates an error if the decimal does not fall within the specified inclusive range. The comparison is made with Python Decimal arithmetic.

The minimum and maximum limits can be None, meaning no lower or upper limit, respectively.


INPUT(_type='text', _name='name', requires=IS_DECIMAL_IN_RANGE(0, 10, dot="."))


Attributes / Arguments

The dot argument is optional and allows you to internationalize the symbol used to separate the decimals.

 requires=IS_DECIMAL_IN_RANGE(0, 10, dot=".")


loading...

Sources / Reference

" Web2py Book"


Comments

loading...

Powered by
Web2py

Hosted on
www.pythonanywhere.com
(affiliated link)