-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Laravel's prepareForValidation instead of hooking into $this->all()
This commit changes the behavior to be more compliant with the way Laravel's internal validation works. After a FormRequest instance has resolved in the application container, the validator will be automatically called. Before the validation runs, "prepareForValidation()" is triggered which has the purpose of alterting request data before it enters validation (which, is exactly what this package does!) This commit also borrows a lot of test scaffolding from Laravel's internal testing, because it is not trivial to create a FormRequest object without initializing the entire application.
- Loading branch information
1 parent
673ce54
commit 3e399c0
Showing
4 changed files
with
153 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters