X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-bootstrap-debug.js;h=77159f7ad964979142c61cbb2a657a3fa50ef611;hb=837f04377ba365e5e01650d8ab199879f6682ee2;hp=a458bcabc7ebf7bbe69c1f6129569388f88df932;hpb=b9c608ff9d36d8c953385fda18843c745758173a;p=roojs1 diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index a458bcabc7..77159f7ad9 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -12200,7 +12200,8 @@ Roo.form.VTypes = function(){ var alpha = /^[a-zA-Z_]+$/; var alphanum = /^[a-zA-Z0-9_]+$/; 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 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 // All these messages and functions are configurable return { @@ -12229,6 +12230,13 @@ Roo.form.VTypes = function(){ url : function(v){ return url.test(v); }, + /** + * The funciton used to validate URLs (only allow schemes 'https' and 'http') + * @param {String} v The URL + */ + urlWeb : function(v) { + return urlWeb.test(v); + }, /** * The error text to display when the url validation function returns false * @type String @@ -13620,6 +13628,7 @@ Roo.extend(Roo.bootstrap.form.TextArea, Roo.bootstrap.form.Input, { this.el.select('.form-control-feedback', true).first().removeClass(this.invalidFeedbackClass); feedback.update(''); + feedback.hide(); } } @@ -13644,6 +13653,7 @@ Roo.extend(Roo.bootstrap.form.TextArea, Roo.bootstrap.form.Input, { if(feedback){ this.el.select('.form-control-feedback', true).first().removeClass([this.invalidFeedbackClass, this.validFeedbackClass]); feedback.update(''); + feedback.hide(); } if(this.disabled || this.allowBlank){ @@ -13695,6 +13705,7 @@ Roo.extend(Roo.bootstrap.form.TextArea, Roo.bootstrap.form.Input, { if(feedback){ this.el.select('.form-control-feedback', true).first().removeClass([this.invalidFeedbackClass, this.validFeedbackClass]); feedback.update(''); + feedback.hide(); } if(this.disabled){ @@ -13735,6 +13746,10 @@ Roo.extend(Roo.bootstrap.form.TextArea, Roo.bootstrap.form.Input, { if(!this.allowBlank && !this.getRawValue().length){ feedback.update(this.blankText); } + + if(feedback.dom.innerHTML) { + feedback.show(); + } }