Skip to content

Align UrlValidator to validate_url gem implementation.

Horatiu Eugen Vlad requested to merge hvlad/gitlab-ce:fix/url_validator into master

What does this MR do?

Renamed UrlValidator to AddressableUrlValidator to avoid 'url:' naming collision with ActiveModel::Validations::UrlValidator in 'validates' statement.

Make use of the options attribute of the parent class ActiveModel::EachValidator.

Add more options: allow_nil, allow_blank.

Renamed 'protocols' option to 'schemes' to match the option naming from UrlValidator.

What are the relevant issue numbers?

Fixes #57365 (closed)

Does this MR meet the acceptance criteria?

Edited by Horatiu Eugen Vlad

Merge request reports