views:

43

answers:

2

I want a class in JavaScript through which I can validate all the Input Boxes on a form. I just want to supply the form name and it must validate the input boxes there in.

Is there any class or something other through which I can achieve this?

+4  A: 

Have you looked at the validator plugin?

http://docs.jquery.com/Plugins/Validation

meder
@meder: Looks great but I guess it is not Free.
RPK
Eh? ( and this is for the required char limit )
meder
jQuery is open source :)http://docs.jquery.com/Licensing
Oscar Kilhed
+1  A: 

If you don't want to use JQuery I described an alternative library in an earlier post http://stackoverflow.com/questions/576631/what-javascript-library-to-use-for-client-side-form-checking/577633#577633

That allows you to just add attributes like REQUIRED or DATE to an <INPUT> tag.

It's a bit old-hat now, but we are still using it in production :)

Kristen