Hi.
IS_IN_SET works alone, not in combination with other validators.
Anyway IS_NOT_EMPTY is not required because the field must have one of the
values given in IS_IN_SET.
try:
db.pampa_classificacaocliente.aceita.requires=IS_IN_SET(['Sim', 'Não'])
regards
mmlado
On Thursday 30 July 2009 15:00:24 Leandro - ProfessionalIT wrote:
> Hi friends,
>
> I have this case:
>
> # Model
> ....
> SQLField('aceita','string', default='Sim'))
> ....
> db.pampa_classificacaocliente.aceita.requires=[IS_NOT_EMPTY(),
> IS_IN_SET(['Sim', 'Não'])]
>
>
> # Controller
> form=SQLFORM(db.pampa_classificacaocliente,rows[0],fields=[...,
> 'aceita'],labels=pampa_classificacaocliente_labels)
>
> # View
> Well, in the view the field 'aceita' output is a input text and not
> a <select><option>Sim</option><option>Não</option></select> field. How
> to implements this ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---