New release validation - Asset link url must be a valid url
Description
Client validation for URL in new release is very basic and doesn't match the server validation. At the moment the client only checks if the URL starts with http://
or https://
while the server checks that it is a valid URL. See examples below
Screenshots
Technical proposal
We should switch the client validation to verify that the provided input is a valid URL.
One way to achieve that is to create a URL object in a try-catch block. If the constructor throws, the URL is invalid. This check should be combined with the existing check for http://
and https://
Files of interest
app/assets/javascripts/releases/stores/modules/edit_new/getters.js
app/assets/javascripts/releases/components/asset_links_form.vue
Edited by Andrei Zubov