From: Tim P. <ti...@pa...> - 2002-11-26 22:47:48
|
On Tuesday 26 November 2002 7:05 pm, Eric B. Ridge wrote: > On Tuesday, November 26, 2002, at 10:37 AM, Marc van de Geijn wrote: > <snip> > > > The "new" question I have is a short one: I've already searched for i= t > > on > > the WebMacro site and in the API. I can not find a method/class to > > check if > > the data I receive from a form is correctly formatted. Is there a > > recommended way to solve this? I'm sure I'm not the only one having > > this > > problem. WebMacro is still suprising me (in a very positive way): May= be > > there is another part of WebMacro I still have not discovered. > > Looking for some kind of form validation, eh? Not part of WebMacro, > but maybe it could be. If you create something you'd like to share, > just let us know. Some of us here could probably help you flush it out > and perhaps get it included as a /contrib package, or as an (optional) > core thing. You're right, it comes up a lot. This wouldn't really be a Template sort of thing to do,=20 it is a framework sort of thing.=20 Form validation depends upon the objects you are putting into=20 and taking out of the form, which implies a commitment to a=20 particular persistence layer. <plug> Melati, which uses WebMacro, has two mechanisms=20 for validation: client -side javascript and server-side=20 validation (as defined by the Data Structure Definition). You, the programmer, get this for free when you buy into the=20 POEM middleware layer. </plug> The client side javascript may be of interest, as it is=20 independant of POEM/Melati http://www.melati.org/melati-static/admin/validation.js=20 cheers tim pizey |