Re: [SMARTY] SmartyValidate Javascript?
| From: | Alain Williams | Date: | Tue, 10 May 2005 16:13:37 +0000 |
| Subject: | Re: [SMARTY] SmartyValidate Javascript? | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-12602@lists.php.net to get a copy of this message | ||
On Tue, May 10, 2005 at 12:24:32PM +0100, Marcus Bointon wrote:
> On 10 May 2005, at 11:36, Vicente Werner wrote:
> >I belive formsess does what you want, but I don't recommend such thing
> >as Javascript is highly problematic in it's iterations between
> >different browsers
>
> Well, no-one said it was easy... but you don't have to do it for
> every browser, because it can always fall back to server-side
> validation (which you must do anyway when JS is unavailable). Client-
> side validation is better for both the visitor (much faster) and the
> server (reduced load). I've had a look at formsess (which does seem
Client side is nice because it makes things better for the user.
Server side IS A MUST -- you CANNOT trust the end user machine, you HAVE to
do server side validation even if it has been checked at the client end.
Think of the cost of getting cr*p data into your database/... because
something might not have been checked. A browser may have javascript
switched off or be in the hands of someone malicious who wants to break
your application.
> to be languishing) and FormCat, however, neither capitalise on the
> fact that you've already set up all the validation rules in
> SmartyValidate, requiring you to set up validation rules twice. It
> just seems that an integrated client/server validation solution would
> be ideal for pretty much everyone?
--
Alain Williams
Parliament Hill Computers Ltd.
Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256
#include <std_disclaimer.h>