Can some one help me here please?? Tried a lot of variations in validating 
the form but failed.
Any help is greatly appreciated.


On Wednesday, 25 January 2017 06:40:37 UTC-8, D R Dinesh Kumar wrote:
>
> Hi,
>
> I am migrating my TG1 project to TG2 and I have the following code in TG1 
> form.
>
> def create(**kw):
>     form = TableForm(fields=[...], validator = [SchemaValidator1()])
>     
>     if kw:
>         @validate(form=form)
>         def get_errors(tg_errors=None, **kw):
>              return tg_errors, kw
>         tg_errors, kw = get_errors(kw)
>
> Basically, the idea was to delay the validation and do it whenever we 
> require (as above).
>
> How to move this code to TG2 that works?
> The same code in TG2 is not working and SchemaValidator1 is not being 
> called at all. I saw the code in TG2 for validate and found that @validate 
> registers the decorator and then calls them during controllerdecorators. So 
> how to achieve what I am looking for?
>
> Please help....
>
> With Regards,
> Dinesh.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to