On Wednesday, December 16, 2015 at 5:09:51 PM UTC-5, Alfonso Serra wrote: > > I thought requires was performed in a different process than the form > serialization. It would be better if the requires information isnt embeded > in the inputs, but the form itself. > Wasnt expecting to redeclare requires as they already are at the models. > In any case, that would do the trick. >
Note, SQLFORM is an abstraction on top of FORM, so for validators to work with FORM (which does not involve a DAL model), it must be possible to define them in association with individual inputs within the form. That is the reason for the current architecture. SQLFORM simply takes a DAL model and uses it to create a FORM object -- from that point, all the validation happens via the FORM object, which knows nothing about DAL models or DAL Field objects. The alternative would require writing separate validation logic for SQLFORM rather than relying on what is already available via FORM. 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.

