PDA

View Full Version : simple javascript form validation tool


bassnrage
12-02-2008, 12:11 PM
so i went back-and-forth on whether to post this... but ultimately i think this is the right place to share this, as it could serve as a benefit to other developers, especially newbies.

i got tired of messing around with form validation javascripts for every custom form i had to work on so i wrote a tool using php and javascript that spits out a javascript form validation script based on the requirements you give it. you enter your requirements, hit submit, and then copy-and-paste the generated script into your web page.

it's not super-fancy. it can handle/check required fields, minimum lengths, matching fields (like password/email verify), numbers only, no numbers, and email validation. the gui is a little funky, cuz i pretty much wrote it for myself to use... however, i have added some instructions to it so that (hopefully) anybody can use it easily. it's really for beginners and/or everyday lame form validation. if you're hiding and showing or activating and deactivating fields and have to validate those kinds of things, this (probably) won't do the trick.

otherwise, give it a whirl when you have a form to validate and let me know how it goes for you: http://javascriptformvalidator.com

mike

mauinick
12-02-2008, 02:47 PM
Very cool, thanks

MauiNick
Construction Estimating Software (http://www.construction-estimating.com)
Shopping Cart (http://www.1cartplus.com)