Nadia Kunkov wrote:
Hi,
I'm wondering if I should use validate() method of ActionForm instead of JavaScript to validate the form. I can see the advantage of validate() when you have an internationalized application, but otherwise why would I have an overhead of going back to the server when I can do the validation on the client side? I'm a struts newbie so I might not see the advantage of validate yet, so can someone tell me why JavaScript would be an inferior choice ( when internationalization is not an issue ).


Thanks
NK
In short, you don't have control over your users' environment. They could be running old browsers; they could have JavaScript disabled; they could be running a browser with non-standard JavaScript support; their browser could be buggy. Malicious users could even manually assemble HTTP requests with invalid data.

By using server-side validation, you take control over all of the data coming into your web application. If you leave validation to the browser, there is always the chance that bad data is going to sneak into your system and do something that you don't expect.

-- Jeff

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to