Avoid checking the user format in every url validation

What does this MR do?

In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18686 we make our policy with url validations more strict, checking also the user format if it is present in the url. But, it seems there are cases where the user can have special characters (See https://gitlab.com/gitlab-org/gitlab-ce/issues/47526).

In this MR we make the user format validation optional, configured when we in the validator.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Fixes #47526 (closed)

Edited by Francisco Javier López

Merge request reports

Loading