On Tuesday, April 18, 2017 at 5:41:38 PM UTC-4, Chris wrote:
>
> Thanks for the info Anthony! I'll try one of those approaches.
>
> Why is validation run before compute?
>

In terms of implementation, compute is handled in the .insert() method, 
which must necessarily run after validation. I suppose we could add code to 
calculate computed values before validation in the .validate_and_ methods, 
but I don't think that really makes sense. Computed fields should not need 
to be validated, as they are in control of generating their own values. You 
should instead validate the inputs to the computed field.

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to