I want a class in JavaScript through which I can validate all the Input Bo开发者_如何学Goxes 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?
Have you looked at the validator plugin?
http://docs.jquery.com/Plugins/Validation
If you don't want to use JQuery I described an alternative library in an earlier post What JavaScript library to use for client-side form checking?
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 :)
精彩评论