My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Wiki pages
Links

Look at http://fh3jsvalidator.googlecode.com/svn/trunk/ for the latest version (0.5a)!! The downloadable zip file can be out of date.

I've created a new javascript validation script which validates form fields. The validator methods are ported from the PHP Formhandler project

The javascript syntax is pretty simple:

window.onload = function(){
	// Add the elements to the validator
	Var Validator = new jsValidator();
	Validator.elmts = {
		name: {
			validator: 'IsString',
			msg: 'This field must be a valid string'
		},
		age: {
			validator: 'IsDigit',
			msg: 'This field must be a digit'
		},
		description: {
			validator: '_IsText',
			msg: 'This textarea can be empty, or must be a valid text'
		}	
	}
	// Fire the validator
	Validator.init();
}

you can also create your own validate functions or your own regular expression

I've also created an extend class for formhandler to auto generate the validation code.

Powered by Google Project Hosting