日期:2014-05-16 浏览次数:20372 次
Ext.apply(Ext.form.VTypes,{ phone:function(v){ return /^(\d{3,4}-)?\d{7,8})$/.test(v); }, phoneText:'电话格式不正确,正确格式如:020-xxxxxxxx', phoneMask:'/[\d]/i' });
{ xtype:'textfield', fieldLabel:'公司电话号码', allowBlank: false, id:'tel', name:'tel', vtype:'phone' }
{ xtype:'textfield', fieldLabel:'联系人手机', allowBlank: false, id:'linkmanPhone', name:'linkmanPhone', regex:new RegExp("\\d{11}"),//验证用的正则表达式 regexText:'手机格式不正确,号码11位!'//客户端验证失败时提示信息 }