So then I would do something like form.accepts(...,
onvalidation=lambda form: myvalidator(form)) ?
I suppose if I use my validator to verify the value is in the other
table, then I wouldn't need to use IS_IN_DB, and could render it
however I want. Thanks, and sorry for the slow response.

On Aug 3, 3:22 am, Fran <francisb...@googlemail.com> wrote:
> On Aug 3, 9:53 am, Fran <francisb...@googlemail.com> wrote:
>
> > This should do what you want:
> > crud.create(db.table, onvalidation=lambda: form: myvalidator(form))
> > onvalidation callback runs before DB I/O
> > (onaccept callback is after DB I/O)
>
> Actually, I see that SQLFORM's accepts() method includes an
> onvalidation callback as well...no need to used crud...
>
> F
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to