Hi, It's stated pretty clearly in the book that it's supposed to work that way. Of course the book could be wrong about it ;-)
I have no upload field, and I don't use Ajax. And I also got it working, both for update and creation, in my app. But I'm not sure what I did that changed it, unfortunately. I removed all onvalidation code last week, and intended to give it another try to debug it today but it just works when rewritten... Either I did something wrong last week, or the problem is dependent on some factor unknown to me. I will poke around a bit and see if I can break it again. Meanwhile, I played around with the idea to write a custom validator instead. When should one use one or the other method? I have two separate date fields in my table, startdate and enddate, that defines a period (from date a to date b). I use a regular IS_DATE validator on them to check they are dates. The functionality I implement in the onvalidate function is a) to check that enddate > startdate and b) that the period startdate to enddate doesn't overlap with any other record in the db for a certain value of a third field. Looking at it briefly it seemed onvalidate would be the easiest solution, but a custom validator could have advantages I don't know about? Regards, Jens Örtenholm 2011/4/8 VP <[email protected]> > > > On Apr 8, 5:49 am, DenesL <[email protected]> wrote: > > Hello Jens, > > > > onvalidation is called *after* the validation, so setting form.errors > > does not have any effect. > > > > > Wait .... Then what is the purpose of onvalidation? I have thought > all along by reading the book that onvalidation is to provide > additional validation. > > I have a similar problem with Jens (but on update, not on creation). > > Jens, do you have an upload field? Does the particular entry that you > want to validate use ajax? > >

