EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: tumbas on November 19, 2017, 03:46:56 AM



Title: ValidType List
Post by: tumbas on November 19, 2017, 03:46:56 AM
Hi,
Base on the doc, the validType can be defined :

email: Match email regex rule.
url: Match URL regex rule.
length[0,100]: Between x and x characters allowed.
remote['http://.../action.do','paramName']: Send ajax request to do validate value, return 'true' when successfully.

Are there list of validType of validateBox except above?

Thanks


Title: Re: ValidType List
Post by: jarry on November 20, 2017, 12:21:35 AM
No other validTypes provided. It is easy to extend a validType. Here is an example shows the 'minLength' validType definition.
Code:
$.extend($.fn.validatebox.defaults.rules, {
    minLength: {
        validator: function(value, param){
            return value.length >= param[0];
        },
        message: 'Please enter at least {0} characters.'
    }
});