Input should always be validated on the back-end to ensure correctness of your application (malicious users can easily circumvent front-end validation).
Input should preferably be validated on the front-end as well, to improve the user experience (not having to reload a page).
In javascript:
var url= document.createElement('a');
url.href = "http://youtube.com/ajshdas";
url.protocol == "http:";
url.hostname == "youtube.com";
url.pathname == "/ajshdas";
I don't know your usecase, but instead of a <select> input, you could simply extract your hostname from your url input.