This commit is contained in:
calzoneman 2013-05-12 20:46:28 -04:00
parent a9dbd908c4
commit b00e63b622
1 changed files with 4 additions and 0 deletions

View File

@ -162,6 +162,10 @@
}
$("#channel").keydown(function(ev) {
if(ev.keyCode == 13) {
if(!$("#channel").val().match(/^[a-zA-Z0-9-_]+$/)) {
alert("Invalid channel names. Channel names may contain alphanumeric characters, underscores, and hyphens");
return;
}
document.location = host + "/r/" + $("#channel").val();
}
});