GUC Blog

function CheckUrl() { var text = document.getElementById('message').value; if (new RegExp("([a-zA-Z0-9]+://)?([a-zA-Z0-9_]+:[a-zA-Z0-9_]+@)?([a-zA-Z0-9.-]+\\.[A-Za-z]{2,4})(:[0-9]+)?(/.*)?").test(text)) { alert("Url is not allowed in address field"); return false; } CheckUrl();