formEncode and validation depended on forms field

Grzegorz Ślusarek against at spam.pl
Wed May 17 09:00:56 CEST 2006


Hi all. I'm using formEncode to validate my forms, and I'm stopped
on how to do a complicated validation that depened on what forms
element was filled. I mean in my code (without formEncode) i have:
if form.select is checked:
    #if select is checked then I checked for others fields on form
    #if select is not checked that I abandon validation
    code...
else:
    if form.login != '' and form.password !='':
	code..
    else:
	code..

How to achieve something like this in formEncode? i can validate all
form but I need validate some fields of form only if others form are
filled.
Thanks for any help
Gregor



More information about the Python-list mailing list