|
|
|
|
|
News: |
|
|
|
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.
Author: Joey W [joey[AT]justto[DOT]com] |
|
|
|
|
|