Overview of features
Home
Read this first
About
web2py is 100% free
Download
Start learning web2py today
Documentation
Authors and contributors
Staff
Affiliated companies
Support
Edit page
Title:
Security Code:
Body:
(use
this
wiki markup)
IS_LENGTH validator has now two arguments instead of one. Now it is possible to set minimal length of the field: INPUT(_type='text', _name='name', requires=IS_LENGTH(maxsize=255, minsize=0)) 1. maxsize: maximum allowed length / size 2. minsize: minimum allowed length / size Examples: Check if text string is shorter than 33 characters: INPUT(_type='text', _name='name', requires=IS_LENGTH(32)) Check if password string is longer than 5 characters: INPUT(_type='password', _name='name', requires=IS_LENGTH(minsize=6)) Check if uploaded file has size between 1KB and 1MB: INPUT(_type='file', _name='name', requires=IS_LENGTH(1048576, 1024))