Bug 977122 - add client-side validation for url field

See https://bugzilla.mozilla.org/show_bug.cgi?id=977122.