Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.x] Accept underscores in the URL validator, as the URL will load #30418

Closed
wants to merge 1 commit into from

Conversation

sgilberg
Copy link
Contributor

[Description copied from same PR for 5.8 https://github.com//pull/30417]

We came across an issue in one of our Laravel apps (currently using 5.8) in which a valid URL was being treated as invalid by the 'url' validation rule, due to the presence of an underscore in the domain name (which, while unconventional, still works). Laravel's validateUrl() method documentation states that it is based on Symfony's UrlValidator. Symfony recently released a fix for this same issue here: symfony/symfony@ad89564 (see related discussion here: symfony/symfony#32506).

I copied the pattern update into Laravel's validateUrl() method and updated the corresponding tests accordingly.

@GrahamCampbell
Copy link
Member

Not to worry. This change has already been included in 6.x and 7.x. :)

@sgilberg
Copy link
Contributor Author

Just saw that the 5.8 branch was merged into 6.x, thanks @GrahamCampbell!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants