GREAT! THATS EXACTLY HOW I FEEL, thanx, now i'm getting that good feeling
again that what i've done is ok...

-----Original Message-----
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Sunday, June 10, 2001 2:04 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Javascript Validation




On Fri, 8 Jun 2001, Dudley Butt@i-Commerce wrote:

> i just find it sometimes easier to move all validation off the jsp, and
> hence all java off the jsp. I think its just basically a personal
> preference. This way I'm making full use of the struts error handling
model
> and keep all my java in one place. There always seems to be more than one
> way to do things, just depends on what u need to do and whats your
> preference
> Thanx for all the help guys
> 

In future versions of Struts we will be integrating the ability to create
client side validations.  In my mind, the purpose of these validations is
to improve the quality of the user interface -- in this case, by catching
errors that can be caught inside the page (such as required fields and
invalid number formats) without wasting the time needed to submit the form
and get the errors back.

However, it is important to understand that you should *ALWAYS*
perform these validations again on the server side.  Consider the
following cases:

* The client turns off JavaScript

* The client does not support JavaScript

* The user is actually typing a URL (with request parameters)
  directly into the location line of the browser.

Basically, never trust the client to do any validations.

Craig McClanahan

Reply via email to