下拉框/单选按钮validation?

我正在为我的表单使用jQuery工具(http://flowplayer.org/tools/demos/index.html)validation器,并想知道如何validation下拉列表和单选按钮?

有人有实施它的经验吗?

它在文档中说你也可以使用SELECT元素的required =“required”属性,但它也不适用于我。 我选择使用自定义validation器function。 希望这对你有用。 这是非常基本的,它缺少一些其他考虑因素,使其更灵活。

$.tools.validator.fn("select[required=required]", function(input, value) { // If the first item in the list is selected return FALSE return !input[0].options[0].selected; }); 

只需添加它: