I have created a regex that seems to be quite stable in validating normal Http URLs, however, it seems to be allowing spaces to be entered anywhere but the protocol.
So, http://dango me/mypage
is being allowed.
'is-url': function() {
return /^(https?:\/\/[a-zA-Z0-9_+%-]+(.[a-zA-Z0-9+\_%-]+)*(:[0-9]{1,5})?(\/[a-zA-Z0-9+()?#~=&\._%-]*)*)?$/.test(this);
}