>
> *        <input id="a" name="a" type="text" value="" size="3" {{requires 
> = IS_NOT_EMPTY(error_message='cannot be empty!')}} />*


My first recommendation is to stop trying completely random syntax that you 
haven't seen anywhere in the documentation or examples. Based on the 
documentation, there's no reason to believe anything like the above should 
work.
 

> *        {{=INPUT(_name="b", requires=IS_INT_IN_RANGE(0, 10) ) }}*
>

You can pass a "requires" attribute to an INPUT() helper, as above, but the 
validation won't actually happen unless the INPUT is part of a FORM object, 
and the FORM object has to be processed (typically in the controller 
function). So, define the form and its INPUT's in the controller and 
process it there if you want to use validators.

Especially since you're new to web2py, I recommend sticking to the design 
patterns you see in the documentation and other examples. Once you become 
more expert, then you can venture into more complicated patterns.

Anthony

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to