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

Introduce FormRequestNormalizer #380

Merged
merged 1 commit into from
Mar 24, 2023

Conversation

bastien-phi
Copy link
Contributor

This PR introduces a FormRequestNormalizer which allows to create a Data from validated content of a FormRequest.

IMHO, it is more safe than to rely on the fact that a Request is Arrayable because unvalidated data won't be included in the Data with this new FormRequestNormalizer.

I did not include this new normalizer by default in the configuration because I think it could break existing applications if unvalidated data are used to create Data objects. I would be glad to enable it by default if you think it's better.

@rubenvanassche
Copy link
Member

Thanks!

@rubenvanassche rubenvanassche merged commit 869b876 into spatie:main Mar 24, 2023
@bastien-phi bastien-phi deleted the form_request_normalizer branch March 24, 2023 08:21
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