Quantcast
Channel: Fluent Validation for .NET
Viewing all articles
Browse latest Browse all 1917

New Post: How can I access controller TempData ...

$
0
0
Hi

No. Validators are completely separate from mvc, and have no knowledge of any mvc-specific items such as controllers or tempdata. The only thing that the validator sees is the object being passed to it for validation, so you could copy the items you need from tempdata into properties on the model. These could then be accessed from within the validator.

Jeremy

Viewing all articles
Browse latest Browse all 1917

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>