-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
Validation attributes #901
Conversation
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.
LGTM, very nice first PR!
Can you please rebase against master? Couple of months passed and it would be great to ensure everything is working as expected.
Thanks!
@mfn I've rebased the branch against master. |
@jacobdekeizer thanks! there are a couple of phpstan errors reported, can you check them? Note: you need to run phpstan with PHP 8.1 (I do this with the included Makefile/Docker stuff). Ping if you've troubles with that. |
@mfn I've fixed the phpstan errors caused by my changes. |
Thank you! |
Summary
Thanks for making this package. I wanted to add custom attributes to the Laravel validator so I can translate the attribute names for the mutation arguments, but this is currently not possible. This pull request will add the custom attributes to the Laravel validator in the GraphQL Field class.
Laravel documentation: https://laravel.com/docs/9.x/validation#customizing-the-validation-attributes
Don't know if you consider adding a new public method as a breaking change or not. Let me know if you have any questions!
Type of change:
Checklist:
composer fix-style