creation of the repo fbpatch
This commit is contained in:
9
js/urls.js
Normal file
9
js/urls.js
Normal file
@@ -0,0 +1,9 @@
|
||||
// https://stackoverflow.com/questions/12741517/how-to-make-url-validation-without-http-or-add-it-after-validation-passed/44848476#44848476
|
||||
|
||||
let old_url = jQuery.validator.methods.url;
|
||||
jQuery.validator.addMethod( 'url', function(value, element) {
|
||||
let url = old_url.bind(this);
|
||||
return url(value, element) || url('http://' + value, element);
|
||||
}, 'Please enter a valid URL'
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user