Jquery EasyUI remote verification, Jquery EasyUI multiple custom verification, EasyUI custom verification

Jquery EasyUI remote verification, Jquery EasyUI multiple custom verification, EasyUI custom verification

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

©Copyright Sweet Potato Yao March 29, 2017

http://fanshuyao.iteye.com/

 

Method 1: Multiple custom validation rules using key-value pairs

<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 should be noted that: the remote result returns

Returns the string "false" for failure, and returns the string "true" for pass

 

Method 2: The method of using an array

data-options="required:true,validType:['numberText','minLength[11]','maxLength[16]']"

 

Jquery EasyUI extended custom validation rules see:

http://fanshuyao.iteye.com/blog/2351388 

 

 

 

 

Official website document description:

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 Sweet Potato Yao March 29, 2017

http://fanshuyao.iteye.com/

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326938619&siteId=291194637