I need to restrict the URL postings in the textarea.
For this I used the code:
var url_act = jQuery("#area").val();
var matches = url_act.match(/http:/);
if (matches)
{
alert('You didn\'t have permission to post any url');
return false;
}
But if the content has any https:
or url starts with www.
is not restricted.
How to restrict if the content has any URL formats or not? If the URL is capital letters is not working.
Is there any way to do this?