• 2561 views
  • 0 comments
  • loading...

Checks that the field value is a floating point number within a definite range.




# Example 0 <= value <= 100 in the following example


requires = IS_FLOAT_IN_RANGE(0, 100, dot=".",
error_message='too small or too large!')

Attributes / Arguments

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

requires = IS_FLOAT_IN_RANGE(0, 100, dot=".",
         error_message='too small or too large!')

Displays an error message.

requires = IS_FLOAT_IN_RANGE('...',  error_message='too small or too large!')


loading...

Sources / Reference

" Web2py Book"


Comments

loading...

Powered by
Web2py

Hosted on
www.pythonanywhere.com
(affiliated link)