views:

1524

answers:

2

How can I validate some inputs that are not inside a form tag?

All the samples I found have a form tag, but I want to validate some inputs that are not inside a form.

thanks!

A: 

Provided we're talking about the same validation plug-in, I don't think it's possible.

I think the requirements for the plug-in dictate that the items to be validated are inside a form.

You could always try replacing the form with a div in a sample page...

Kieron
I tried using a div but didn't work... thanks!
Bruno
Ah, in that case it's probably tied to the form then - sorry and good luck.
Kieron
+3  A: 

You can use this plugin: jQuery Validator

Description from the author:

A light, extensible, clean and 'easy-to-use' form validator. It's can validate onblur, onkeyup, onsubmit or you can validate when you want. You can validate fields in a DIV without a FORM tag.

Note: It is a new plugin, in Beta at v1.0.

Raithlin
This plugin is now at version 1.0, released in May.
Ken I.