[web2py] Re: Validation per object

2010-04-02 Thread carlo
To Yarko latest post I did not read: > in either way you are doing this (db field type, or FORM-INPUT), the > way is similar: totally agree. One thing: I think it is never underlined enough that you do not necessarily have to pass the form to the view so that having FORM + "requires" helpers in

[web2py] Re: Validation per object

2010-04-02 Thread carlo
thank you Yarko for your always informative answers and for your natural attitude to understand there are different point of views (I wish I had someone like you in my company :-). Just to come close to something I will show an example (though not particularly smart): my controller: form=FORM(IN

[web2py] Re: Validation per object

2010-04-02 Thread Yarko Tymciurak
Just to comment, get back to Mengu's original post: I believe the problem Mengu is seeking to solve: To have field- specific feedback per specific validator failure. On Mar 15, 4:52 am, Mengu wrote: > Hi all, > > Currently web2py validation works on CRUD and SQLFORM. But some of us > don't use

[web2py] Re: Validation per object

2010-04-02 Thread Yarko Tymciurak
Hello Carlo - Know, there is no right or wrong - but I am trying to understand... On Apr 2, 3:38 am, carlo wrote: > Thank you Yarko for accepting my "challenge" and I am looking forward > to get your answer. > > > When I need to do this, I do it with making a memory-based table, and > > SQLFORM

[web2py] Re: Validation per object

2010-04-02 Thread DenesL
On Apr 1, 5:04 pm, carlo wrote: > sorry for this "out of sync" answer but though I managed some "tricks" > to tackle the (problem of) validation in pure html forms during these > years, I would be curious about an answer to Mengu's request of > "showing how to make validation with manual forms".

[web2py] Re: Validation per object

2010-04-02 Thread carlo
Thank you Yarko for accepting my "challenge" and I am looking forward to get your answer. > When I need to do this, I do it with making a memory-based table, and > SQLFORM or SQLFORM.factory, and do whatevervalidationI need. I do not want to discuss your solution though personally I do not like a

Re: [web2py] Re: Validation per object

2010-04-01 Thread Thadeus Burgess
I actually have an example for this kind of form. Say I have two Records, Person 124 and Person 532. Well come to find out, record 124 and 532 are the exact same person who signed up twice. I want to merge the two records together and leave with just one, but oh noes 532 has more up to date info

[web2py] Re: Validation per object

2010-04-01 Thread Yarko Tymciurak
On Apr 1, 5:04 pm, carlo wrote: > sorry for this "out of sync" answer but though I managed some "tricks" > to tackle the (problem of) validation in pure html forms during these > years, I would be curious about an answer to Mengu's request of > "showing how to make validation with manual forms".

[web2py] Re: Validation per object

2010-04-01 Thread carlo
sorry for this "out of sync" answer but though I managed some "tricks" to tackle the (problem of) validation in pure html forms during these years, I would be curious about an answer to Mengu's request of "showing how to make validation with manual forms". Sorry DenesL but you did not answer the q

[web2py] Re: Validation per object

2010-03-15 Thread Yarko Tymciurak
On Mar 15, 5:28 am, Mengu wrote: > > First of all, I am not sure what is the problem you are trying to > > solve. Even if you have custom forms and you build all the form html > > manually you can still use the existing validation mechanism. > > I don't want to use crud or sqlform or any html help

[web2py] Re: Validation per object

2010-03-15 Thread DenesL
On Mar 15, 6:28 am, Mengu wrote: > > First of all, I am not sure what is the problem you are trying to > > solve. Even if you have custom forms and you build all the form html > > manually you can still use the existing validation mechanism. > > I don't want to use crud or sqlform or any html hel

Re: [web2py] Re: Validation per object

2010-03-15 Thread Thadeus Burgess
Mengu Not an option to add validation on the database level other than database type options (like column type, isnull, etc etc). Massimo's point is that SQLFORM and the Validators provide a pivotal role in web2py, they take the incoming HTML formatted data, and convert this to python types. (

[web2py] Re: Validation per object

2010-03-15 Thread mdipierro
> > Second, there is a logical problem. Validators are designed to take > > the input as submitted by a web form and not as passed to the input > > function. For example for a IS_DATE a validator expects a "string" in > > the user locale, while input expects a datetime.date object or an ISO > > ser

[web2py] Re: Validation per object

2010-03-15 Thread Mengu
> First of all, I am not sure what is the problem you are trying to > solve. Even if you have custom forms and you build all the form html > manually you can still use the existing validation mechanism. I don't want to use crud or sqlform or any html helper. i build my forms manually. and actually

[web2py] Re: Validation per object

2010-03-15 Thread mdipierro
No way. ;-) First of all, I am not sure what is the problem you are trying to solve. Even if you have custom forms and you build all the form html manually you can still use the existing validation mechanism. Second, there is a logical problem. Validators are designed to take the input as submitt