I would rather do: ``/^https?:/.test(value)`` so that the presence of the colon is checked (otherwise a folder or a file whose name starts with ``http`` would not be handled correctly)
Note that (even if it is not very important in this context) we could also accept protocol relative urls: http://www.paulirish.com/2010/the-protocol-relative-url/