checkbox validation prob
"alain@free" <[email protected]>
| Newsgroups | gmane.comp.python.formencode |
|---|---|
| Message-ID | <[email protected]> |
hello
i have a checkbox prob
i would like to give a custom message when a cb is not checked
this fails:
tos = validators.NotEmpty(messages={'empty': 'I am empty'})
and the message i get is " Missing value"
from what i read this is expected as a default from Schema
when a field does not exists
when i try to give a default val as ''
tos = validators.NotEmpty(if_missing='' , messages={'empty': 'I am empty'})
i dont get much succes and it is no more considered as empty
so what can i do to get my message for an unchecked cb
thanks
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV