Actually, I was looking at custom validator but didn't think about request.vars.
Excellent suggestion, it works perfectly :)

For inI do not need server generated forms as I use extjs as client frontend.
Thanks again !!!

On 22 Apr 2012, at 18:42, Anthony wrote:

> There are no full row validators. It gets tricky because some validators also 
> transform their values, so dependencies among validators could become 
> difficult to resolve. Anyway, if the inserts will be happening via form 
> submissions, you have a couple options. First, you could use an onvalidation 
> function instead of a validator: 
> http://web2py.com/books/default/chapter/29/7#onvalidation. Another option is 
> to create a custom validator -- the custom validator can then access the 
> entire submitted record via request.vars.
> 
> Anthony
> 
> On Sunday, April 22, 2012 8:03:54 AM UTC-4, Joseph.Piron wrote:
> Hi guys, 
> 
> I just wondered how I am supposed to add a row validator in db models ?
> I looked at the code of validate function but it seems each validator is only 
> passed the value of the field it is bound to.
> I am looking for this as I have to validate the value of one field based on 
> other fields value.
> 
> Thanks in advance for your help :) !

Reply via email to