#How to access context inside a custom validator class

1 messages · Page 1 of 1 (latest)

thorny sentinel
#

I'm trying to achieve validation in a custom validator class. I've successfully injected a service that relies on the authenticated user. I cannot access the user object added to the request inside a custom validation. If you've got other suggestions on how i can achieve that, it's most welcome.

stiff sage
#

I cannot access the user object added to the request inside a custom validation
Do you see any errors?

thorny sentinel
#

With the API signature, it's not possible because the interface that is implemented gives 2 methods that are validate an defaulMessage .Their signature don't accept the context object.