Protocol required in isValidURL

pull/1/head
yflory 4 years ago
parent 34964ba598
commit f938e3e60a

@ -555,7 +555,7 @@
};
Util.isValidURL = function (str) {
var pattern = new RegExp('^(https?:\\/\\/)?'+ // protocol
var pattern = new RegExp('^(https?:\\/\\/)'+ // protocol
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+ // domain name
'((\\d{1,3}\\.){3}\\d{1,3}))'+ // OR ip (v4) address
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+ // port and path

Loading…
Cancel
Save