for client-side validation
based on Smarty.
It’s easy and flexible [Formcat on SourceForge]
[Formcat on HotScripts]
[Formcat on PHPCLASSES.ORG]
News:
BIG NEWS: FORMCAT 1.04 RELEASED. see online demo
[2005-06-11]Formcat 1.04 released. Click here to download Formcat 1.04 Pro Version
*Add “optional” attribute to all validator except “dateCompare”.
*Fix a bug : When there are no form tags in template,formcat will return blank page.
*Fix a bug: When there are no catform tags in template,formcat will return blank page.
(Formcat’s changelog)
You can also download Formcat 1.04 Lite Version Here
[Formcat 1.04 Documentations Are Available Now] [Simplified Chinese Version Doc]
click the button to donate:
Formcat is a class for performing form validation on the client side.Its goal is to generate Javascript code to validate forms before they are submited to the server.
It works as a plug-in for the Smarty template engine. It is a good complement SmartyValidate plug-in that performs server side validation.It supports many built-in validation criteria: empty, range, length,checkbox, radio button, integer, float, email, credit card, list menu,date, date comparison, equality between fields, file size, file type, custom validator calls.
{formcat …} tags can be located anywhere in the templates, regardless of where the corresponding fields are located in the form.
Formcat 1.04 released. Click here to download Formcat 1.04 Pro Version
Older Versions:
[Download Formcat 1.03 here] [Download SmartyValidate 2.3 here]
If you like the Formcat,don’t forget to donate.Your donation allows me keep the Formcat up-to-date,fun,cute,and easy to use.Thanks.
Features:
* Multi-forms in a page can be supported.
* Supplied validation criteria to provide empty,range,length,checkbox,radio button,integer,float, email,credit card,list menu,date,date comparison,equality between fields,file size,file type…and customzied validator calls.Auto-genenrate the Javascript for client-side validation by “formcat tags” .
* {catform…} extra function attributes can make your validation colorfully and easily.
* {formcat …} tags can be located anywhere in your template, regardless of where the corresponding fields are located.It’s very flexible.It’s very good soultion for validation combining the Smarty-Validate.
* Multiple validators may be used for one field.And User can add other validating javascript function into the function which auto-generated.
* Easy to expand the validator.just copy the custom validator to the validator directory
Requirements:
You must enable session management prior to using Formcat . Do this by calling session_start() at the top of your PHP application.Formcat also requires the Smarty template environment. [Download the Smarty template environment here]
Installation:
To install Formcat:
* Copy the ‘formcat.class.php’ file and “validators” directory(lite version don’t need to do that)to a place within your php_include path (or use absolute pathnames when including.)
* Copy all of the plugins to your Smarty plugin directory. (located in the plugins/ directory of the distribution.)
Background:
Form validation is one of the most frequently performed tasks when it comes to web application programming.In order to decrease the run load of server,we usually validate the data in client-side by Javascript or other script,but it’s a tedious and time-consuming task.
SmartyValidate is powerful class to provide form validation in server-side.I didn’t find a good solution for client-side validation.I heard that there’s a class could solve both. It’s Formsess.However,Formsess has following problems:
1.more bugs and no one supports.I found a few obvious bugs.
2.the manual seems a litte bit simple.According to it,you can’t get result as it said.
3.the fatal problem is that Formsess makes basic html tags change to the “fs tags” Unfortunately there are not HTML editors can detect them.It’s not user-friendly.
(Please forgive me for my personal opinion to Formsess.:-) )
Therefore, I developed the “Formcat” to solve them.It’s a part of my development framework which named “PIGCAT development framework”(not released yet).Formcat just performs the client-side validating.You basically provide the validation criteria and error messages,Formcat does the rest.
Special Thanks:
Messju Mohr (from Smarty forum)
Monte Ohrt (from Smarty forum)
boots (from Smarty forum)
Sylvestre Ledru (contributed “flashFocus” extra function,http://sylvestre.ledru.info/)









