fix email regix
authorAlan <alan@roojs.com>
Tue, 21 Nov 2023 06:49:29 +0000 (14:49 +0800)
committerAlan <alan@roojs.com>
Tue, 21 Nov 2023 06:49:29 +0000 (14:49 +0800)
docs/src/Roo_form_VTypes.js.html
roojs-all.js
roojs-bootstrap-debug.js
roojs-bootstrap.js
roojs-debug.js
roojs-ui-debug.js
roojs-ui.js

index 39316c8..be95257 100644 (file)
@@ -17,7 +17,7 @@
     </span><span class="jsdoc-comment">// closure these in so they are only created once.
     </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">alpha </span><span class="jsdoc-syntax">= /^[a-zA-Z_]+$/;
     </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">alphanum </span><span class="jsdoc-syntax">= /^[a-zA-Z0-9_]+$/;
-    </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">email </span><span class="jsdoc-syntax">= /^([\w-]+)(\.[\w-]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;
+    </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">email </span><span class="jsdoc-syntax">= /^([\w'-]+)(\.[\w'-]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;
     </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">url </span><span class="jsdoc-syntax">= /^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&amp;#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
     </span><span class="jsdoc-keyword">var </span><span class="jsdoc-var">urlWeb </span><span class="jsdoc-syntax">= /^((https?):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&amp;#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
 
index 062414f..e2cea35 100644 (file)
@@ -2318,9 +2318,10 @@ if(this.width){this.el.setWidth(this.width);}if(this.height){this.el.setHeight(t
 Roo.form.FieldSet=function(A){Roo.form.FieldSet.superclass.constructor.call(this,A);};Roo.extend(Roo.form.FieldSet,Roo.form.Layout,{defaultAutoCreate:{tag:'fieldset',cn:{tag:'legend'}},onRender:function(ct,A){Roo.form.FieldSet.superclass.onRender.call(this,ct,A);
 if(this.legend){this.setLegend(this.legend);}},setLegend:function(A){if(this.rendered){this.el.child('legend').update(A);}}});
 // Roo/form/VTypes.js
-Roo.form.VTypes=function(){var A=/^[a-zA-Z_]+$/;var B=/^[a-zA-Z0-9_]+$/;var C=/^([\w-]+)(\.[\w-]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;var D=/^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;var E=/^((https?):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
-return {email:function(v){return C.test(v);},emailText:'This field should be an e-mail address in the format "user@domain.com"',emailMask:/[a-z0-9_\.\-@]/i,url:function(v){return D.test(v);},urlWeb:function(v){return E.test(v);},urlText:'This field should be a URL in the format "http:/'+'/www.domain.com"',alpha:function(v){return A.test(v);
-},alphaText:'This field should only contain letters and _',alphaMask:/[a-z_]/i,alphanum:function(v){return B.test(v);},alphanumText:'This field should only contain letters, numbers and _',alphanumMask:/[a-z0-9_]/i};}();
+Roo.form.VTypes=function(){var A=/^[a-zA-Z_]+$/;var B=/^[a-zA-Z0-9_]+$/;var C=/^([\w'-]+)(\.[\w'-]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;var D=/^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
+var E=/^((https?):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return {email:function(v){return C.test(v);},emailText:'This field should be an e-mail address in the format "user@domain.com"',emailMask:/[a-z0-9_\.\-@]/i,url:function(v){return D.test(v);
+},urlWeb:function(v){return E.test(v);},urlText:'This field should be a URL in the format "http:/'+'/www.domain.com"',alpha:function(v){return A.test(v);},alphaText:'This field should only contain letters and _',alphaMask:/[a-z_]/i,alphanum:function(v){return B.test(v);
+},alphanumText:'This field should only contain letters, numbers and _',alphanumMask:/[a-z0-9_]/i};}();
 // Roo/form/FCKeditor.js
 Roo.form.FCKeditor=function(A){Roo.form.FCKeditor.superclass.constructor.call(this,A);this.addEvents({editorinit:true});};Roo.form.FCKeditor.editors={};Roo.extend(Roo.form.FCKeditor,Roo.form.TextArea,{fckconfig:false,toolbarSet:'Basic',basePath:'/fckeditor/',frame:false,value:'',onRender:function(ct,A){if(!this.el){this.defaultAutoCreate={tag:"textarea",style:"width:300px;height:60px;",autocomplete:"new-password"}
 ;}Roo.form.FCKeditor.superclass.onRender.call(this,ct,A);Roo.form.FCKeditor.editors[this.getId()]=this;this.replaceTextarea();},getEditor:function(){return this.fckEditor;},setValue:function(A){if(typeof(A)=='undefined'){return;}Roo.form.FCKeditor.superclass.setValue.apply(this,[A]);
index f996fff..f274f26 100644 (file)
@@ -12199,7 +12199,7 @@ Roo.form.VTypes = function(){
     // closure these in so they are only created once.
     var alpha = /^[a-zA-Z_]+$/;
     var alphanum = /^[a-zA-Z0-9_]+$/;
-    var email = /^([\w-]+)(\.[\w-]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;
+    var email = /^([\w'-]+)(\.[\w'-]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;
     var url = /^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
     var urlWeb = /^((https?):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
 
index 2fac2bd..db25651 100644 (file)
@@ -525,9 +525,10 @@ this.maskEl.right.setLeft(E.right+this.padding);this.maskEl.right.setTop(E.y-thi
 this.maskEl.left.setSize(0,0).setXY([0,0]);this.maskEl.left.hide();this.maskEl.bottom.setStyle('position','absolute');this.maskEl.bottom.setSize(0,0).setXY([0,0]);this.maskEl.bottom.hide();this.maskEl.right.setStyle('position','absolute');this.maskEl.right.setSize(0,0).setXY([0,0]);
 this.maskEl.right.hide();this.toolTip.hide();this.toolTip.el.hide();window.onwheel=function(){return true;};if(this.intervalID){window.clearInterval(this.intervalID);this.intervalID=false;}this.isMasked=false;}}});
 // Roo/form/VTypes.js
-Roo.form.VTypes=function(){var A=/^[a-zA-Z_]+$/;var B=/^[a-zA-Z0-9_]+$/;var C=/^([\w-]+)(\.[\w-]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;var D=/^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;var E=/^((https?):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
-return {email:function(v){return C.test(v);},emailText:'This field should be an e-mail address in the format "user@domain.com"',emailMask:/[a-z0-9_\.\-@]/i,url:function(v){return D.test(v);},urlWeb:function(v){return E.test(v);},urlText:'This field should be a URL in the format "http:/'+'/www.domain.com"',alpha:function(v){return A.test(v);
-},alphaText:'This field should only contain letters and _',alphaMask:/[a-z_]/i,alphanum:function(v){return B.test(v);},alphanumText:'This field should only contain letters, numbers and _',alphanumMask:/[a-z0-9_]/i};}();
+Roo.form.VTypes=function(){var A=/^[a-zA-Z_]+$/;var B=/^[a-zA-Z0-9_]+$/;var C=/^([\w'-]+)(\.[\w'-]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;var D=/^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
+var E=/^((https?):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return {email:function(v){return C.test(v);},emailText:'This field should be an e-mail address in the format "user@domain.com"',emailMask:/[a-z0-9_\.\-@]/i,url:function(v){return D.test(v);
+},urlWeb:function(v){return E.test(v);},urlText:'This field should be a URL in the format "http:/'+'/www.domain.com"',alpha:function(v){return A.test(v);},alphaText:'This field should only contain letters and _',alphaMask:/[a-z_]/i,alphanum:function(v){return B.test(v);
+},alphanumText:'This field should only contain letters, numbers and _',alphanumMask:/[a-z0-9_]/i};}();
 // Roo/bootstrap/form/Input.js
 Roo.bootstrap.form.Input=function(A){Roo.bootstrap.form.Input.superclass.constructor.call(this,A);this.addEvents({focus:true,blur:true,specialkey:true,change:true,invalid:true,valid:true,keyup:true,paste:true});};Roo.extend(Roo.bootstrap.form.Input,Roo.bootstrap.Component,{validationEvent:"keyup",validateOnBlur:true,validationDelay:250,focusClass:"x-form-focus",invalidClass:"has-warning",validClass:"has-success",hasFeedback:true,invalidFeedbackClass:"glyphicon-warning-sign",validFeedbackClass:"glyphicon-ok",selectOnFocus:false,maskRe:null,vtype:null,disableKeyFilter:false,disabled:false,allowBlank:true,blankText:"Please complete this mandatory field",minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",validator:null,regex:null,regexText:"",invalidText:"",autocomplete:false,fieldLabel:'',inputType:'text',name:false,placeholder:false,before:false,after:false,size:false,hasFocus:false,preventMark:false,isFormField:true,value:'',labelWidth:2,labelAlign:false,readOnly:false,align:false,formatedValue:false,forceFeedback:false,indicatorpos:'left',labellg:0,labelmd:0,labelsm:0,labelxs:0,capture:'',accept:'',parentLabelAlign:function(){var A=this;
 while(A.parent()){A=A.parent();if(typeof(A.labelAlign)!='undefined'){return A.labelAlign;}}return 'left';},getAutoCreate:function(){var id=Roo.id();var A={};if(this.inputType!='hidden'){A.cls='form-group'}var B={tag:'input',id:id,type:this.inputType,value:this.value,cls:'form-control',placeholder:this.placeholder||'',autocomplete:this.autocomplete||'new-password'}
index ac6a13e..8b4e714 100644 (file)
@@ -56019,7 +56019,7 @@ Roo.form.VTypes = function(){
     // closure these in so they are only created once.
     var alpha = /^[a-zA-Z_]+$/;
     var alphanum = /^[a-zA-Z0-9_]+$/;
-    var email = /^([\w-]+)(\.[\w-]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;
+    var email = /^([\w'-]+)(\.[\w'-]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;
     var url = /^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
     var urlWeb = /^((https?):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
 
index dbba53a..5ed0104 100644 (file)
@@ -31517,7 +31517,7 @@ Roo.form.VTypes = function(){
     // closure these in so they are only created once.
     var alpha = /^[a-zA-Z_]+$/;
     var alphanum = /^[a-zA-Z0-9_]+$/;
-    var email = /^([\w-]+)(\.[\w-]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;
+    var email = /^([\w'-]+)(\.[\w'-]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;
     var url = /^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
     var urlWeb = /^((https?):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
 
index 819aac3..b8107cc 100644 (file)
@@ -1371,9 +1371,10 @@ if(this.width){this.el.setWidth(this.width);}if(this.height){this.el.setHeight(t
 Roo.form.FieldSet=function(A){Roo.form.FieldSet.superclass.constructor.call(this,A);};Roo.extend(Roo.form.FieldSet,Roo.form.Layout,{defaultAutoCreate:{tag:'fieldset',cn:{tag:'legend'}},onRender:function(ct,A){Roo.form.FieldSet.superclass.onRender.call(this,ct,A);
 if(this.legend){this.setLegend(this.legend);}},setLegend:function(A){if(this.rendered){this.el.child('legend').update(A);}}});
 // Roo/form/VTypes.js
-Roo.form.VTypes=function(){var A=/^[a-zA-Z_]+$/;var B=/^[a-zA-Z0-9_]+$/;var C=/^([\w-]+)(\.[\w-]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;var D=/^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;var E=/^((https?):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
-return {email:function(v){return C.test(v);},emailText:'This field should be an e-mail address in the format "user@domain.com"',emailMask:/[a-z0-9_\.\-@]/i,url:function(v){return D.test(v);},urlWeb:function(v){return E.test(v);},urlText:'This field should be a URL in the format "http:/'+'/www.domain.com"',alpha:function(v){return A.test(v);
-},alphaText:'This field should only contain letters and _',alphaMask:/[a-z_]/i,alphanum:function(v){return B.test(v);},alphanumText:'This field should only contain letters, numbers and _',alphanumMask:/[a-z0-9_]/i};}();
+Roo.form.VTypes=function(){var A=/^[a-zA-Z_]+$/;var B=/^[a-zA-Z0-9_]+$/;var C=/^([\w'-]+)(\.[\w'-]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;var D=/^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
+var E=/^((https?):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return {email:function(v){return C.test(v);},emailText:'This field should be an e-mail address in the format "user@domain.com"',emailMask:/[a-z0-9_\.\-@]/i,url:function(v){return D.test(v);
+},urlWeb:function(v){return E.test(v);},urlText:'This field should be a URL in the format "http:/'+'/www.domain.com"',alpha:function(v){return A.test(v);},alphaText:'This field should only contain letters and _',alphaMask:/[a-z_]/i,alphanum:function(v){return B.test(v);
+},alphanumText:'This field should only contain letters, numbers and _',alphanumMask:/[a-z0-9_]/i};}();
 // Roo/form/FCKeditor.js
 Roo.form.FCKeditor=function(A){Roo.form.FCKeditor.superclass.constructor.call(this,A);this.addEvents({editorinit:true});};Roo.form.FCKeditor.editors={};Roo.extend(Roo.form.FCKeditor,Roo.form.TextArea,{fckconfig:false,toolbarSet:'Basic',basePath:'/fckeditor/',frame:false,value:'',onRender:function(ct,A){if(!this.el){this.defaultAutoCreate={tag:"textarea",style:"width:300px;height:60px;",autocomplete:"new-password"}
 ;}Roo.form.FCKeditor.superclass.onRender.call(this,ct,A);Roo.form.FCKeditor.editors[this.getId()]=this;this.replaceTextarea();},getEditor:function(){return this.fckEditor;},setValue:function(A){if(typeof(A)=='undefined'){return;}Roo.form.FCKeditor.superclass.setValue.apply(this,[A]);