Ext ip的vtype

var IPReg = /^(/d{1,2}|1/d/d|2[0-4]/d|25[0-5])/.(/d{1,2}|1/d/d|2[0-4]/d|25[0-5])/.(/d{1,2}|1/d/d|2[0-4]/d|25[0-5])/.(/d{1,2}|1/d/d|2[0-4]/d|25[0-5])$/i;
 Ext.apply(Ext.form.VTypes, {
    IPVali: function(val, field) {
        return IPReg.test(val);
    },
    IPValiText: 'ip地址不正确'
});

你可能感兴趣的:(function,ext)