You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Run validation on a field."""directive@validate(
""" References functions that receive the `Illuminate\Contracts\Validation\Validator` after validation is completed. Consists of two parts: a class name and a method name, seperated by an `@` symbol. If you pass only a class name, the method name defaults to `__invoke`. """after: [String!]
) onFIELD_DEFINITION
Having the withValidator hook available after the main validation has been completed would be useful for us. We need to run validation on a field that might not have been provided to see whether it should have been or not in the context of other input parameters.
Currently, it seems that if a field hasn't been provided in the request, and it's not marked as required in the validator, no validation gets run on it at all, including any custom validator classes. The withValidator hook would allow us to get around this.
I have checked the docs about: https://laravel.com/docs/9.x/validation#after-validation-hook but I think this feature isn't available yet, it would be really good if Lighthouse supported this feature
The text was updated successfully, but these errors were encountered: