Jquery EasyUI remote verification, Jquery EasyUI multiple custom verification, EasyUI custom verification, jqueryeasyui
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Copyright Yao March 30, 2017
Http://www.cnblogs.com/fanshuyao/
Method 1: Use Key-value pairs for multiple custom validation rules
Html code
- <Input value = "$ {orgUnit. pinYin}" class = "easyui-textbox w150 jtrim" id = "pinYin" name = "pinYin"
- Data-options ="
- Required: true,
- Delay: 600,
- ValidateOnBlur: false,
- ValidType :{
- MinLength: [4],
- MaxLength: [4],
- Remote: ['$ {pageContext. request. contextPath}/isOrgUnitPinYinExist? OrgId =$ {orgUnit. orgId} ', 'pinyin']
- }"
- />
It must be noted that the remote result is returned.
Returns the string "false" to indicate that the request fails. returns the string "true" to indicate that the request passes
Method 2: Use Arrays
Html code
- Data-options = "required: true, validType: ['numbertext', 'minlength [11] ', 'maxlength [16]']"
For details about Jquery EasyUI extension custom validation rules, see:
Http://fanshuyao.iteye.com/blog/2351388
Official Website documentation:
Defines the field valid type, such as email, url, etc. Possible values are:
1) a valid type string, apply a single validate rule.
2) a valid type array, apply multiple validate rules. The multiple validate rules on a field are available since version 1.3.2.
3) a key/value pairs, the key is the validing type name, the value is an array consisting validating parameters.
Code example:
<input class="easyui-validatebox" data-options="required:true,validType:'url'"><input class="easyui-validatebox" data-options="required:true,validType:['email','length[0,20]']"><input class="easyui-validatebox" data-options="required:true,validType:{length:[10,30],remote:['http://.../action.do','paramName']}">
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Copyright Yao March 30, 2017
Http://www.cnblogs.com/fanshuyao/