i have an asp.net mvc project with xval and data annotations and i need to switch to nhibernate validation
with data annotations i had an DataAnnotationsValidationRunner and i was doing something like this
var errors = DataAnnotationsValidationRunner.GetErrors(this).ToList();
if(errors.Any())
throw new RulesException(errors);
how do you do that with nhibernate.validator ?
UPDATE: I saw something like this
var engine = new ValidatorEngine();
var errors = engine.Validate(objstovalid)
but i cannot do
if (errors.Any())
throw new RulesException(errors);
because errors is not of the correct type (xVal.ServerSide.ErrorInfo)