From 4ef6649f9ede57ef2ada9bc4fe91cc6939054277 Mon Sep 17 00:00:00 2001 From: Alan Date: Mon, 5 Jun 2023 14:34:07 +0800 Subject: [PATCH] fix #7675 - formating on other link urls --- docs/json/roodata.json | 26 ++++++++++++++++++++ docs/src/Roo_bootstrap_form_TextArea.js.html | 7 ++++++ docs/src/Roo_form_VTypes.js.html | 10 +++++++- docs/symbols/Roo.form.VTypes.json | 26 ++++++++++++++++++++ 4 files changed, 68 insertions(+), 1 deletion(-) diff --git a/docs/json/roodata.json b/docs/json/roodata.json index df115b4e93..0ef4e4c21e 100644 --- a/docs/json/roodata.json +++ b/docs/json/roodata.json @@ -276598,6 +276598,32 @@ } ], "returns" : [] + }, + { + "name" : "urlWeb", + "type" : "function", + "desc" : "The funciton used to validate URLs (only allow schemes 'https' and 'http')", + "sig" : "(v)", + "static" : false, + "memberOf" : "", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "exceptions" : "", + "requires" : "", + "params" : [ + { + "name" : "v", + "type" : "String", + "desc" : "The URL", + "isOptional" : false + } + ], + "returns" : [] } ], "isAbstract" : false, diff --git a/docs/src/Roo_bootstrap_form_TextArea.js.html b/docs/src/Roo_bootstrap_form_TextArea.js.html index cf79eddf62..83f8dd6eba 100644 --- a/docs/src/Roo_bootstrap_form_TextArea.js.html +++ b/docs/src/Roo_bootstrap_form_TextArea.js.html @@ -187,6 +187,7 @@ this.el.select('.form-control-feedback', true).first().removeClass(this.invalidFeedbackClass); feedback.update(''); + feedback.hide(); } } @@ -211,6 +212,7 @@ if(feedback){ this.el.select('.form-control-feedback', true).first().removeClass([this.invalidFeedbackClass, this.validFeedbackClass]); feedback.update(''); + feedback.hide(); } if(this.disabled || this.allowBlank){ @@ -262,6 +264,7 @@ if(feedback){ this.el.select('.form-control-feedback', true).first().removeClass([this.invalidFeedbackClass, this.validFeedbackClass]); feedback.update(''); + feedback.hide(); } if(this.disabled){ @@ -303,6 +306,10 @@ feedback.update(this.blankText); } + if(feedback.dom.innerHTML) { + feedback.show(); + } + } } diff --git a/docs/src/Roo_form_VTypes.js.html b/docs/src/Roo_form_VTypes.js.html index 627b174d70..e4ef4d6d61 100644 --- a/docs/src/Roo_form_VTypes.js.html +++ b/docs/src/Roo_form_VTypes.js.html @@ -18,7 +18,8 @@ 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 { @@ -47,6 +48,13 @@ 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 diff --git a/docs/symbols/Roo.form.VTypes.json b/docs/symbols/Roo.form.VTypes.json index ff602cc8e6..3c864f92ea 100644 --- a/docs/symbols/Roo.form.VTypes.json +++ b/docs/symbols/Roo.form.VTypes.json @@ -99,6 +99,32 @@ ], "returns" : [] }, + { + "name" : "urlWeb", + "type" : "function", + "desc" : "The funciton used to validate URLs (only allow schemes 'https' and 'http')", + "sig" : "(v)", + "static" : false, + "memberOf" : "", + "isStatic" : false, + "isConstructor" : false, + "isPrivate" : false, + "example" : "", + "deprecated" : "", + "since" : "", + "see" : "", + "exceptions" : "", + "requires" : "", + "params" : [ + { + "name" : "v", + "type" : "String", + "desc" : "The URL", + "isOptional" : false + } + ], + "returns" : [] + }, { "name" : "alphanum", "type" : "function", -- 2.39.2