FluentValidation based on Session information

How du I access session information from a fluent validator? I’m trying to apply some validation rules based using fluent validation based on the current logged in user data (name, role, etc). But it seems hard to get session information into a fluent validator?

I some example given online where the session was fetched from the CacheClient but when running my unit tests I just get:

This AppHost does not support accessing the current Request via a Singleton,StackTrace

The AbstractValidator gets injected with the Current Request so you can access it from the Request, e.g:

var session = base.Request.GetSession();

Although note you’ll only be able to access any injected properties like base.Request in the lambda since it won’t have been set yet in the constructor.