1.单个校验无参数:<input id="vv" class="easyui-validatebox" data-options="required:true,validType:'email'" />
2.单个校验有参数:
<input id="pwd" name="pwd" type="password" class="easyui-validatebox" data-options="required:true" /> <input id="rpwd" name="rpwd" type="password" class="easyui-validatebox" required="required" validType="equals['#pwd']" />
3.多个校验有参数:
<input class="easyui-textbox" type="text" name="orgCode" data-options="validType:['complexValid[\'^[0-9a-zA-Z_\-]+$\',\'编码只能包含字母、数字、中划线、下划线\',\'${root}/org/ajax\',\'orgCode\',\'机构编码已被占用,换一个试试!\',\'orgId\']','checkLength[60]']"></input>
4.在datagrid中,行字段可编辑并加入校验:
<th data-options="field:'paramValue',width:130,halign:'center',editor:{type:'validatebox',options:{required:true,validType:'checkLength[64]'}}">参数值</th>