• 2272 views
  • 0 comments
  • loading...

Works very much like IS_DATETIME validator but allows to specify a range:




requires = IS_DATETIME_IN_RANGE(format=T('%Y-%m-%d %H:%M:%S'),

minimum=datetime.datetime(2008,1,1,10,30),
maximum=datetime.datetime(2009,12,31,11,45),
error_message='must be YYYY-MM-DD HH:MM::SS!')

loading...

Sources / Reference

" Web2py Book"


Comments

loading...

Powered by
Web2py

Hosted on
www.pythonanywhere.com
(affiliated link)