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
[5.2] Add a validator helper as a shorthand for Validate::make() #11146
Conversation
👎 for adding more helpers. |
@GrahamCampbell I love me some helpers 🎱 |
*/ | ||
function validate(array $data, array $rules, array $messages = [], array $customAttributes = []) | ||
{ | ||
$factory = app('Illuminate\Contracts\Validation\Factory'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please import this and use ::class
notation.
Will do! |
Also, please rebase to avoid conflicts when importing since I recently modified this file. |
Squashed the amend in and rebased to the HEAD of 5.2, I assume that's correct? |
Seems like it should be named |
That would make more sense actually, given the other factory helpers are defined in the same way. |
21bd68a
to
803d1e6
Compare
Helper functions are kept in alphabetical order. |
Ha. We probably need a StyleCI check for that, lol. The whole if statement stuff makes that sort of check slightly harder to implement, which is a shame. |
Sorting that now :) |
bf53ece
to
2b05401
Compare
Hopefully thats all good! 😀 |
and use ::class notation. Order new helper alphabetically :)
[5.2] Add a validator helper as a shorthand for Validate::make()
No description provided.