this: def validate_my_form(form) if form.vars.channel == "foo": form.errors.channel = "This channel is not valid"
if form.process(onvalidation=validate_my_form).accepted: # do whatever here *Bruno Cezar Rocha** - @rochacbruno* rochacbr...@gmail.com | Mobile: +55 (11) 99210-8821 www.CursoDePython.com.br | www.rochacbruno.com.br Blog: Using Python to get all the external links from a webpage<http://rochacbruno.com.br/using-python-to-get-all-the-external-links-from-a-webpage/> Get a signature like this. <http://r1.wisestamp.com/r/landing?promo=18&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_18> Click here.<http://r1.wisestamp.com/r/landing?promo=18&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_18> On Tue, Sep 4, 2012 at 4:09 PM, Daniel Gonzalez <gonva...@gmail.com> wrote: > Something like this: > > if form.process().accepted: > if request.var.channel == 'voicemail': validate requests.var.destination > as a mail address. > elif request.var.channel == 'sipaddress' validate requests.var.destination > as a sip address. > elfi request.var.channel == 'phone' validate requests.var.destination > as a telephone number > > > I have two questions: > --