On Jan 7, 8:22 am, Manakel <manakel...@gmail.com> wrote:
> But i don't understand how i can perform business level check when
> using SQLForm
> -> this may be real date , but it's a date in the future so i don't
> allow the insertion/ update of the record (Business rules)
> -> this may be a real date, and date is today or in the past, but it's
> before the "Fixing Date" so i don't allow the insertion/ update of the
> record (Business Rules)
> What is the recommended way to handle this kind of form level
> validation in web2py?

I can think of 2 approaches:
(1) Write a custom Validator
- store this in your modules folder & call from your model
(2) Use a Manual Form where you can process the business logic in your
controller before inserting the data into the database

F
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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