Skip to content

Added validation for the URL to allow it to stay blank or it must be a valid...

John Dorlus requested to merge (removed):Fixes#386254 into master

Closes #386254 (closed)

This PR addresses the above mentioned issue by adding the validation rules for the URL for the metrics image. Upon the form first loading, the url is considered valid because it is blank and the URL is allowed to be optional. Upon change, the URL is validated again and if it isn't a valid URL, there is a small message in red text stating that the URL is invalid right under the input element. Once the URL is either deleted or made to be valid, the error message goes away. If a user tries to submit the form while the URL is invalid, an alert pops up telling the user to properly address the URL issue. We can change this behavior to something more Vue-esque if desired.

Screenshots

Empty State Upon Load

Screenshot_2023-01-04_at_7.49.51_AM

Invalid URL with single Character

Screenshot_2023-01-04_at_7.50.00_AM

Invalid URL With Improper Protocol

Screenshot_2023-01-04_at_7.50.58_AM

Invalid URL Random Characters and trying to submit form

Screenshot_2023-01-04_at_7.51.39_AM

Valid URL

Screenshot_2023-01-04_at_7.50.12_AM

Empty State After Deleting Invalid URL

Screenshot_2023-01-04_at_7.49.51_AM

Merge request reports