Skip to content

Add frontend validation to avoid duplicate asset link names

What does this MR do and why?

Solves #277087 (closed)

When creating a new release the assets link name validation was missing in frontend.
Assets link name should be unique.

Today we are showing a generic error message giving no clue what is wrong in the form.

Screenshots

before Screen_Shot_2022-02-24_at_21.58.26 save button was enable and when hit save we were showing a generic error message at the top of the page: Screen_Shot_2022-02-24_at_21.58.44

after Screen_Shot_2022-02-24_at_21.48.39 Now save button is disabled and we show what fields are incorrect.

Notes

Issue #277087 (closed) was proposing to fix frontend and backend API validations. Apparently backend validation is already set in model: app/models/releases/link.rb:14

To sum up this MR only adds frontend validation.

Edited by Andrew Fontaine

Merge request reports