Good I am breaking my head with this situation and I do not even know where to start. I have a list of valid URLs for an input, let's say 10 url from where users can enter links in an input, what I'm looking for is that if the user enters a link from a URL that is not in that list, an error will appear and not Allow it to hit the Enter button, knowing that the code should only validate what is between wwww and .com or. net, since after the .com what follows is the link and that will always vary.
I have the HTML made I do not publish it because I really could not get past this point.