EasyUI Forum
April 25, 2024, 08:57:25 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: ValidType List  (Read 4073 times)
tumbas
Newbie
*
Posts: 5


View Profile Email
« 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
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 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.'
    }
});
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!