PHP Classes

Combo Validation: Validates Web forms on browser and server side

Recommend this page to a friend!
  Info   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 60%Total: 1,048 All time: 3,534 This week: 488Up
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
Age: ???
All time rank: 135815 in Iran Iran
Week rank: 170 Up2 in Iran Iran Up

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 (5)  
  • screenshot/Custom.jpg
  • screenshot/Custom_display_Custom_Div.gif
  • screenshot/Custom_display_form_center.jpg
  • screenshot/custom_display_inline_div.jpg
  • screenshot/Simple.jpg
  Files folder image Files (19)  
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 (19)  /  documentation  
File Role Description
  HTML file index.html Doc. Tutorial

  Files folder image Files (19)  /  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 (19)  /  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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,048
This week:0
All time:3,534
This week:488Up
User Ratings User Comments (2)
 All time
Utility:80%StarStarStarStarStar
Consistency:65%StarStarStarStar
Documentation:75%StarStarStarStar
Examples:65%StarStarStarStar
Tests:-
Videos:-
Overall:60%StarStarStarStar
Rank:1163
 
not work, generate all 500 error .
13 years ago (allnet4u)
30%StarStar
not work, generate all 500 error .
13 years ago (allnet4u)
30%StarStar