Client side validation is all well and good for reducing unnecessary round trips, etc... but the fact is you cannot depend on it working. There's nothing wrong with using it (I use it all the time), but it cannot be the only thing you use. At some point you have to make as sure as possible that the data your application is operating upon is really valid, or you risk errors and/or unintended behavior. Assuming the client validated the data as you expect is foolhardy.
cropr wrote: Generating a form in a html template is better than with FormEncode. Unless I've missed something, FormEncode is not for generating forms in your HTML. I agree with the rest of the point - writing your HTML forms in HTML just makes sense in many cases. Julien Cigar wrote: I never understood the usefulness of generating HTML forms with Python code. > Same here - it's never been as easy or as clean as just writing HTML for me > What I do is that I'm writing the HTML form by hand and for validation I'm > also doing a first check in javascript, and on the server-side I'm using a > small function to validate the form I mostly do the same... the JS just checks that they filled in the necessary fields where necessary (if it's a complex form or something), but FormEncode does the "real" validation. Hadn't considered using the Genshi filters to do the form filling though, that's an interesting idea... -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
