申请时Mootools formcheck
遇到js问题。自定义函数可以与Text Field一起使用,但Selectbox不是。custom function
Selectbox field
我的自定义函数的虚拟代码:
var customFunc = function customFuncF(el) {
el.errors.push('Custom function!!!');
return false;
};
我有一个简单的表单可以应用于文本字段:
和
<input type="text" class="validate['%customFunc']" id="User_lastName" name="User[lastName]" >
-> 它适用于文本字段。
但是当我以我的简单形式申请时custom function
,Selectbox field
它Office list
似乎不起作用并且总是返回true
。我的选择框示例代码
<select id="User_officeId" class="validate['%customFunc']" name="User[officeId]" >
<option selected="selected" value="">-Select Office-</option>
<option value="1">Office A</option>
<option value="2">Office B</option>
</select>
我该如何custom function
申请Selectbox field
?
谢谢,