Maybe the IS_EXPR() validator? IS_EXPR IS_EXPR
Its first argument is a string containing a logical expression in terms of a variable value. It validates a field value if the expression evaluates to True. For example: 1. 2. requires = IS_EXPR <http://web2py.com/book/default/docstring/IS_EXPR>('int(value)%3==0', error_message=T <http://web2py.com/book/default/docstring/T>('not divisible by 3'))

