If you want to restrict users from entering more than one or two URL, just use the following jQuery snippet.
Notice /g at the end of regular expression? it stands for “Global search” flag and returns multiple matches, without this flag it will return just one match. There are other two more flags : /i(ignore case) and /m (multiline).
Create a textarea and submit button like so:
Try entering multiple URL below, button should be disabled if it finds more than 1 URL.