I have a MVC 3 site but am using the non-MVC FluentValidation dll. I've created a validator class and in the constructor put all my RuleFors and then set an attribute on my model class thus
[FluentValidation.Attributes.Validator(typeof(MyValidator))]
The problem is that the constructor on the validator class never gets called. I think it might be because I am not using the MVC version of the dll, but then I could not get that version to work for me either.
Any help would be appreciated.
Thanks,
Sachin
FluentValidation.Mvc
, NOTFluentValidation.Mvc.WebApi
as the provider exists in both. Caught me out. – Imperfection