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

[7.0] Allow multiple redirects when creating clients #928

Merged
merged 1 commit into from
Jan 11, 2019
Merged

[7.0] Allow multiple redirects when creating clients #928

merged 1 commit into from
Jan 11, 2019

Conversation

driesvints
Copy link
Member

This change allows for multiple redirects in a comma separated list when adding them through the ClientController. It makes use of a custom validation rule which will separate the urls by the comma and run the url validator rule over each one individually.

Except for https://example.com individually, the value of https://example.com,https://example2.com would be allowed as well.

I took the approach of a custom validation rule because it seemed the most flexible in terms of implementing the custom logic. It allows for re-using Laravel's url validation rule.

Fixes #897

This change allows for multiple redirects in a comma separated list when adding them through the ClientController. It makes use of a custom validation rule which will separate the urls by the comma and run the url validator rule over each one individually.

Except for https://example.com individually, the value of https://example.com,https://example2.com would be allowed as well.

I took the approach of a custom validation rule because it seemed the most flexible in terms of implementing the custom logic. It allows for re-using Laravel's url validation rule.

Fixes #897
@taylorotwell taylorotwell merged commit ce37402 into laravel:7.0 Jan 11, 2019
@driesvints driesvints deleted the redirect-rule branch January 11, 2019 14:47
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