Hi, web2py users. In my model, I've got a field of type "list:string" which 
I'm trying to validate. The field is defined as follows:

Field('f_field_name', type='list:string', 
>           
> requires=IS_IN_SET(theset=list_of_acceptable_options,zero=T(message), 
> error_message=T(some_error_message)))
>

This renders perfectly well as a select element/drop-down menu when the 
table that contains it is passed to SQLFORM(). However, if I pass a list of 
validators to "requires," the list renders as an unordered list containing 
an input box and a javascript:void(0) reference. For instance, the 
following trivial example would render in the fashion described:

Field('f_field_name', type='list:string', 
>           
> requires=[IS_IN_SET(theset=list_of_acceptable_options,zero=T(message), 
> error_message=T(some_error_message)),
>                       
> IS_IN_SET(theset=list_of_acceptable_options,zero=T(message), 
> error_message=T(some_error_message))]
> )
>

Any ideas as to what the issue could be? Any recommendations on how to use 
IS_IN_SET() in combination with another validator? Thanks!

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to