Thanks - I checked the manual more and used:
requires=IS_EXPR('float(value) % .25 == 0',error_message=T('Error in
value'))But on a similar note, where would I put global functions? add a module with the custom functions? Thanks Michael On Oct 11, 9:44 am, Iceberg <[email protected]> wrote: > On Oct11, 7:23pm, "Michael - afewtips.com" <[email protected]> wrote: > > > Hi, > > I need to do this > > > ( db.field % .25 == 0 ) > > > calculation on a field entered into a form. > > > Do I need to create a function that checks (what?) or can it be > > entered directly in the > > db definition? > > > Thanks > > Michael > > Yes, you can define a function as the onvalidation callback for > SQLFORM or for Crud. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

