Login   Register  
PHP Classes
elePHPant
Icontem

jForm Validator: Validate forms with rules defined in form template

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (14)   DownloadInstall with Composer Download .zip   Reputation   Support forum (4)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2013-02-07 (1 year ago) RSS 2.0 feedStarStarStarStar 64%Total: 1,232 This week: 2All time: 2,878 This week: 790Up
Version License PHP version Categories  
jform-validation 1.4.2GNU General Public Lice...5.0HTTP, PHP 5, Validation
Description Author  

This class can validate forms with rules defined in form template.

It takes as parameter HTML template that defines the layout of a form with inputs.

The class can validate the submitted form values using rules defined in HTML attributes of the input tags in the the form HTML template.

It supports rules defined in HTML 5 specification as well other custom types of validation rules like required, week, month, color, creditcard, url, integer, number, range, email, alphabetic, alphanumeric, time, datetime, datetime-local, date, captcha, zipcode, countryelement, maxlength, minlength, min, max, mustmatch, enum and callback.

The class can also parse the template to remove the validation attributes that are not valid in HTML 4 or HTML 5, and then it replaces the input values attributes with the form submitted values.

Innovation Award  
PHP Programming Innovation award nominee
May 2012
Number 5


Prize: One downloadable copy of Komodo IDE
Most Web pages with forms have inputs that need to satisfy certain rules that need to be validated.

Usually the form presentation output is defined separately from the rules that need to be validated.

This class provides an alternative approach that allows to define the form output template and the validation rules in the same place.

Manuel Lemos
Picture of Jonas Earendel
Name: Jonas Earendel <contact>
Classes: 1 package by
Country: Sweden Sweden
Age: 40
All time rank: 190118 in Sweden Sweden
Week rank: 732 Up5 in Sweden Sweden Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Plain text file class.is.php Class A class that validates simple values
Plain text file class.jForm.php Class The Base Validator Class
Accessible without login Plain text file example_big.php Example A big example
Accessible without login Plain text file example_small.php Example A small example
Accessible without login Plain text file example_w_jquery.php Example A small example with jQuery
Accessible without login Plain text file is.js Data Validates simple values
Accessible without login Plain text file jform.css Data Css for pretty icons
Accessible without login Plain text file jquery.validate.js Data A JavaScript/jQuery validator class
Accessible without login Plain text file jquery.validate.translations.fr-FR.js Data French jQuery error messages
Accessible without login Plain text file jquery.validate.translations.sv-SE.js Data Swedish jQuery error messages
Accessible without login Plain text file lang.en-GB.php Conf. English error messages
Accessible without login Plain text file lang.fr-FR.php Conf. French error messages
Accessible without login Plain text file lang.sv-SE.php Conf. Swedish error messages
Accessible without login Image file validator.png Icon The icons for required, ok and errors

Downloadjform-validation-2013-02-07.zip 32KB
Downloadjform-validation-2013-02-07.tar.gz 27KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
credit card validation Download .zip .tar.gz Enables the "creditcard" input type Conditional
 Version Control Unique User Downloads Download Rankings  
 0%Total:1,232All time:2,878
 This week:2This week:790Up
User Ratings User Comments (1)  
 All time
Utility:91%StarStarStarStarStar
Consistency:91%StarStarStarStarStar
Documentation:-
Examples:91%StarStarStarStarStar
Tests:-
Videos:-
Overall:64%StarStarStarStar
Rank:567
 
Good job.
2 years ago (JYO)
70%StarStarStarStar