Validation block against Nhibernate.Validator

I am looking for verification frameworks and although I already use NHibernate, I think about using NHibernate.validator from the Contrib project, but I also look at the MS Validation block, which seems reliable, but I have not yet gone into the details of each one, however, I I wonder if anyone took a step in these two frameworks and how does this happen?

+6
validation nhibernate model
source share
4 answers

The NHibernate Validator does not require you to use NHibernate for storage. Use can be as simple as:

var engine = new ValidatorEngine(); InvalidValue[] errors = engine.Validate(someModelObjectWithAttributes); foreach(var error in errors) { Console.WriteLine(error.Message); } 

Of course, it can connect to NHibernate and prevent the storage of invalid objects, but you can also use it to check for non-stationary objects.

+10
source share

For the most part, I would say Spring.NET is pretty independent. This should not force you to reverse engineer. You can use as much or less as you want. It should be pretty easy to write an object that can be injected into classes that require validation using Spring. Then you must associate this object with the lock to get the name of the "Validation Group" or "Validators" that you needed, and then spring enter the validators in this object, where your form / business object / service will then use validators.

Here is a link to the document verification - section 12:

http://www.springframework.net/docs/1.2.0-M1/reference/html/index.html

Are you just using a lock or using a monorail?

0
source share

How about D) None of the above. I remember how I appreciated this last year and decided to upgrade to the Spring .NET validation framework.

If you use NHibernate, you probably want to use Spring.NET tools to use NHibernate.

-one
source share

All Articles