easy-ui表单校验---针对单个字段,多重校验(有参数校验+无参数检验)
生活随笔
收集整理的這篇文章主要介紹了
easy-ui表单校验---针对单个字段,多重校验(有参数校验+无参数检验)
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
1.單個(gè)校驗(yàn)無(wú)參數(shù):<input id="vv" class="easyui-validatebox" data-options="required:true,validType:'email'" />
2.單個(gè)校驗(yàn)有參數(shù):
<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.多個(gè)校驗(yàn)有參數(shù):
<input class="easyui-textbox" type="text" name="orgCode" data-options="validType:['complexValid[\'^[0-9a-zA-Z_\-]+$\',\'編碼只能包含字母、數(shù)字、中劃線、下劃線\',\'${root}/org/ajax\',\'orgCode\',\'機(jī)構(gòu)編碼已被占用,換一個(gè)試試!\',\'orgId\']','checkLength[60]']"></input>4.在datagrid中,行字段可編輯并加入校驗(yàn):
<th data-options="field:'paramValue',width:130,halign:'center',editor:{type:'validatebox',options:{required:true,validType:'checkLength[64]'}}">參數(shù)值</th>
轉(zhuǎn)載于:https://www.cnblogs.com/Darkqueen/p/9509799.html
總結(jié)
以上是生活随笔為你收集整理的easy-ui表单校验---针对单个字段,多重校验(有参数校验+无参数检验)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2018 多校联合训练 10
- 下一篇: vs编译应用程序不依赖运行vs环境