"Git repository URL" field shows "This field is required" validation error when the URL is provided but not the correct format

Summary

When setting up repository mirroring, the "Git repository URL" field contains misleading validation text - when the field is filled in, but is not formatted correctly, the validation message says "This field is required.":

image

Steps to reproduce

  1. Navigate to a project on GitLab.com
  2. Settings > Repository > Mirroring repositories
  3. In the "Git repository URL" field, paste in git@github.com:nfriend/qmk_firmware.git

What is the current bug behavior?

The validation message reads "This field is required."

What is the expected correct behavior?

The validation message reads "This is not a valid git repository URL." (Or something similar.)

Output of checks

This bug happens on GitLab.com.

Possible fixes

Make the validation a bit smarter:

No input = "This field is required."
Bad input = "This is not a valid git repository URL."

Assignee Loading
Time tracking Loading