Hi kabir khan,
You can have a look at this link !!
Click Here Hope that may help you to understand !!
And Below code is using Jquery validation
1$.validator.addMethod("cus_url", function(value, element)
2 {
3 if(value.substr(0,7) != 'http://')
4 {
5 value = 'http://' + value;
6 }
7 if(value.substr(value.length-1, 1) != '/')
8 {
9 value = value + '/';
10 }
11 return this.optional(element) || /^(http|https|ftp):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/i.test(value);
12 }, "Not valid url.");
Por favor, faça login para denunciar.