[Zope] How to check if a string contains some characters??

Stephane Bortzmeyer bortzmeyer@pasteur.fr
Tue, 13 Mar 2001 09:20:23 +0100


On Monday 12 March 2001, at 17 h 31, the keyboard of "David Burton" 
<eloquence@eloquent-designs.f2s.com> wrote:

> A better idea would normally to try to handle invalid values before it
> reaches ZOPE.
> Something like this is usually best handled by Javascript verification.

Bad idea: what if the browser does not have JavaScript or decided to switch it 
off (because he dislikes pages which resizes the browser or popup when you 
leave)?

JavaScript is a convenience for users: you are informed that something is 
wrong before you hit Submit. But the server MUST test anyway. (Think of 
security issues if all the checking is client-side.)