NHibernate Forge
The official new home for the NHibernate for .NET community

Comments: NHibernate Validator 1.0.0 Documentation

Page Details

First published by:
Fabio Maulo
on 09-13-2008
Last revision by:
Dario Quintana
on 03-18-2009
6 people found this article useful.
Comments (23)
History (11)

NHibernate Validator 1.0.0 Documentation

Sort by: Published Date | Most Recent | Most Useful
1 2 3 4 5 Next >
By: Bobser Posted on 02-06-2009 8:51

There no longer seems to be a method GetInvalidValues on the ValidatorEngine class, instead it is on the IClassValidator interface, therefore

ValidatorEngine validator = new ValidatorEngine();

InvalidValue[] validationMessages = validator.GetInvalidValues(customer);

becomes

ClassValidator classValidator= new ClassValidator(customer.GetType());                        

InvalidValue[] validationMessages = classValidator.GetInvalidValues(customer);

By: hostdude99 Posted on 03-26-2009 9:45

Is there any additional information on MyBeanConstraint?  You mention you would discuss later but I don't see anything.  Specifically, I am hoping there is functionality to manage domain level validation - ie: the last name of a person must be unique, etc.

By: craigvn Posted on 05-25-2009 22:01

One thing that seems to not be very well documented is the IMessageInterpolator. If you could provide a working example along the lines of this question stackoverflow.com/.../nhibernate-validator-custom-imessageinterpolator it would be very helpful.

By: Loki670 Posted on 07-07-2009 15:41

I have the following setup and things work well.  But I want to check and see how localization is holding up.  Can anyone tell me how to make my setup think I am French so i will get the default french validation messages?  Thanks for the help.

           var nhvc = new NHVConfiguration();

           nhvc.Properties[NHVC.Environment.ValidatorMode] = "UseAttribute";

           nhvc.Properties[NHVC.Environment.AutoregisterListeners] = "true";

           nhvc.Mappings.Add(new NHVC.MappingConfiguration("Server.Domain", null));

           validator.Configure(nhvc);

           //Registering of Listeners and DDL-applying here

           ValidatorInitializer.Initialize(cfg, validator);

Powered by Community Server (Commercial Edition), by Telligent Systems