PHP Classes
elePHPant
Icontem

Combo Validation: Validates Web forms on browser and server side

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (14)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2008-08-10 (8 years ago) RSS 2.0 feedStarStarStarStar 65%Total: 1,026 This week: 1All time: 3,446 This week: 1,047Up
Version License PHP version Categories
combovalidation 1.0.14GNU General Publi...4.3HTML, Validation
Description Author

This class can be used to validate Web forms both on browser and server side.

It can generate to validate forms on the browser side before the forms are submitted. It can also validate forms on the server side using the class own PHP code.

Currently it supports several built-in validation types like: empty fields, e-mail address, URL, numeric value within optional range, length between a range, etc..

The way that errors are displayed after browser side validation is configurable and it works the same way in different browsers.

List of features :
---* Customizable
----------o Validation : (defining new field types, overriding validation functions , using regex , etc...)
----------o View : ability to choose between various ways of showing errors. currently "alert,div , nearFields, pageCenterDiv, formCenterDiv ,customizedDiv" are supported out of the box. and it's also possible to override the display function and show errors in the way you want.
---* Cross browser (IE6+, Firefox2+, Opera7+, Safari3+, All Mozilla based browsers)
---* Very well tested. More than 30 projects are currently using it
---* Easily integrate able , All of the PHP functions used in the class have prefix and also accepts prefix for JavaScript for preventing conflict with other JavaScript in the application
---* Ajax support : No official Ajax support at the moment but since you can completely overwrite the built in validation functions and error display functions you can do the validation with your own Ajax framework
---* Light weight : Because it does not use any JavaScript framework.
---* Extensible : Some design patterns like factory and chain of commands have been used in both JavaScript and PHP sides for ease of extensibility. Code is documented and also name of all of the methods and functions are self described.
---* PHP 4 & 5 compatible
---* Multilingual
---* XHML Valid

Picture of sinasalek
Name: sinasalek <contact>
Classes: 2 packages by
Country: Iran Iran

Details
Author : Sina Salek (http://sina.salek.ws)
Website : http://combovalidation.sourceforge.net
Version : 1.0

This class is meant to validate HTML forms via PHP and also JavaScript  in the simplest possible way. all you need to do is to create an array of form fields information with require parameters and then call few methods.

Notice : As i mentioned before, this class works pretty fine in most of the circumstances unless you define a wrong array. Unfortunately there is no validation for the options you pass to the class so when you set a wrong parameter, all you see is a wrong behavior. Therefore,  please check the array structure with the bundled working examples and also this manual and make sure that you defined it correctly. and if the problem still remains then report it as bug.

Notice : This document currently only covers the basic features of this class, for the advanced features such as defining a new field type, customizing error display and validation functions check out bounded examples , inside "examples" folder.
Main features :

    * Customizable
          o Validation : (defining new field types, overriding validation functions , using regex , etc...)
          o View : ability to choose between various ways of showing errors. currently "alert,div , nearFields, pageCenterDiv, formCenterDiv ,customizedDiv" are supported out of the box. and it's also possible to override the display function and show errors in the way you want.
    * Cross browser (IE6+, Firefox2+, Opera7+, Safari3+, All Mozilla based browsers)
    * Very well tested. More than 30 projects are currently using it
    * Easily integrate able , All of the PHP functions used in the class have prefix and also accepts prefix for JavaScript for preventing conflict with other JavaScript in the application
    * Ajax support : No official Ajax support at the moment  but since you can completely overwrite the built in validation functions and error display functions you can do the validation with your own Ajax framework
    * Light weight : Because it does not use any JavaScript framework.
    * Extensible : Some design patterns like factory and chain of commands have been used in both JavaScript and PHP sides for ease of extensibility. Code is documented and also name of all of the methods and functions are self described.
    * PHP 4 & 5 compatible
    * Multilingual
    * XHML Valid
	
To-do :

    * Better error reporting for class methods and options
    * Validation for fields info and parameters
    * Making it Jquery compatible (optional)
    * Validation should work with multiply forms in one page (by adding formName item to each fieldInfo)
    * Single JavaScript class in web page with multiply instance, validation instances should be connected
    * Special methods for ease of validation via Ajax
    * Support three type of messages , warning , information , error
    * Compress JavaScript's

Change log :
	
	rev12@2008-06-28 (First official release), 
	    * in Firefox when form defines in non w3c way, Firefox can't find the fields inside it. it should throw an error
	    * getElementsByName() issue with multiRadioBoxes and multiCheckBoxes solved 
	    * supporting for new type "array"
	    * optimizing getFormFieldObject() for large forms
	    * if formName does not define, it will for the fields in the whole document
	    * support finding the field value via only field name without pattern name
	    * tested with PHP 4.x and PHP 5.2.x
	    * completely tested with IE 6.x,7.x , Firefox 2.x , Opera 9.x , Safari 3.x
	    * Ajax support via completely overriding object display or validation function
	    * custom field type
	    * customizing error messages
	    * override display function
	    * custom new display modes
	    * overriding or extending validation functions (validate, validateAfter, validateBefore)
	    * limited custom validation for fields which have need regular validations like notEmpty and also some more
	    * chain of commands pattern support for JavaScript and PHP
	    * validate fields with regular expression (JavaScript & PHP)
Screenshots  
  • screenshot/Simple.jpg
  • screenshot/custom_display_inline_div.jpg
  • screenshot/Custom_display_form_center.jpg
  • screenshot/Custom_display_Custom_Div.gif
  • screenshot/Custom.jpg
  Files folder image Files  
File Role Description
Files folder imagedocumentation (1 file)
Files folder imageexamples (5 files)
Files folder imagelib (4 files)
Plain text file validationV1.class.inc.php Class Version 1 mode class
Plain text file validation.class.inc.php Class Factory class
Accessible without login Plain text file readme.txt Doc. Readme
Plain text file license.txt Lic. License

  Files folder image Files  /  documentation  
File Role Description
  HTML file index.html Doc. Tutorial

  Files folder image Files  /  examples  
File Role Description
  Plain text file customizedView.php Example Custom view
  Plain text file customValidation.php Example Custom validation
  Plain text file includes.inc.php Example Including class dependencies
  Plain text file index.php Example List of examples
  Plain text file simpleUsage.php Example Simple usage

  Files folder image Files  /  lib  
File Role Description
  Plain text file classesCore.class.inc.php Class Main parent class
  Plain text file common.inc.php Class Require functions
  Plain text file compatibility.inc.php Class Require functions for PHP4 backward compatibility
  Plain text file PEAR.php Class PEAR main class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,026
This week:1
All time:3,446
This week:1,047Up
User Ratings User Comments (2)
 All time
Utility:87%StarStarStarStarStar
Consistency:68%StarStarStarStar
Documentation:81%StarStarStarStarStar
Examples:68%StarStarStarStar
Tests:-
Videos:-
Overall:65%StarStarStarStar
Rank:659
 
not work, generate all 500 error .
6 years ago (allnet4u)
30%StarStar
not work, generate all 500 error .
6 years ago (allnet4u)
30%StarStar