fix: Sider Issues
This commit is contained in:
parent
4d91f318f9
commit
ea38895f1a
5 changed files with 9 additions and 7 deletions
|
|
@ -80,6 +80,7 @@
|
|||
"validate_email": true,
|
||||
"validate_name": true,
|
||||
"validate_phone": true,
|
||||
"validate_url": true,
|
||||
"get_number_format": true,
|
||||
"format_number": true,
|
||||
"format_currency": true,
|
||||
|
|
@ -144,6 +145,7 @@
|
|||
"cy": true,
|
||||
"it": true,
|
||||
"expect": true,
|
||||
"describe": true,
|
||||
"context": true,
|
||||
"before": true,
|
||||
"beforeEach": true,
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ window.validate_name = function(txt) {
|
|||
|
||||
window.validate_url = function(txt) {
|
||||
return frappe.utils.validate_type(txt, "url");
|
||||
}
|
||||
};
|
||||
|
||||
window.nth = function(number) {
|
||||
number = cint(number);
|
||||
|
|
|
|||
|
|
@ -166,12 +166,12 @@ def validate_url(txt, throw=False):
|
|||
url = urlparse(txt).netloc
|
||||
if not url:
|
||||
raise frappe.ValidationError
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
if throw:
|
||||
frappe.throw(
|
||||
frappe._(
|
||||
"'{0}' is not a valid URL"
|
||||
).format('<strong>' + +'</strong>')
|
||||
).format('<strong>' + txt +'</strong>')
|
||||
)
|
||||
|
||||
return False
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue