Jake’s Form Validator

The task of validating a form before submitting it isn’t exactly complex but it is fiddly and can take some time. And the more functionality you need the longer it takes. Because of this I’ve made a reusable, adaptable, flexible Javascript form validator.

There are 303 lines of Javascript code plus a readme.txt and an example.html page so it’s a bit much to post on here. Plus I’m probably going to update it at some point. Therefore I’ve created a project on sourceforge.net. I’m not sure if that’s really the place for it so if anyone knnows of any decent small-scale-project open source code sharing sites then let me know. Anyway, here’s the link to the project. (i’ve only just created it. Apparently it’ll take 15 minutes or so to show up.)

Update 1: SourceForge seems a bit over the top for something small like this so i’ve made a google code project for it instead.

Update 2: I’ve had to adapt this script for use in a live project which has led to a few improvements. I have also started writing a PHP class which performs many of the same validations which should be used in conjunction with the javascript validation (because remember, kids: Client-side security is easily bypassed). Neither of these updates are quite ready to be put online. Watch this space.


About Mr Chimp

I make music, draw pictures, browse the internet, programme, and make sweet, sweet cups of tea until the early hours.
This entry was posted in Uncategorized and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s