[bug 1081413] Change code for url validation

The code for url validation has been changed to be in line with the url validation code addition made in base/static/js/fjord_utils.js
[bug 1081413] Add test for url validation