nhibernate-validator

Configuring NHibernate Validator on a Burrow ASP.net Application

I'm looking for the best way to configure NHibernate Validator on a classic ASP.net app that is using NHibernate Burrow to manage NH sessions. How do I get it to register the interecptors automatically? ...

xVal in MVC.NET with nHibernate.validator does not fire client validation

I have an ASP.NET MVC Project working with NHibernate and NHibernate.Validator and i'd like to use xVal 1.0 (most recent release). I Added the requested scripts to the project and referenced it in Site.Master: <script type="text/javascript" src="<%= ResolveUrl("~/Scripts/jquery-1.3.2.js")%>"></script> <script type="text/javascri...

Dual NHibernate Class Level Validators Issue

I'm using WPF and I've got an Entity bound to a series of controls. The entity is decorated with two class level validators as follows: [ExampleValidator1, ExampleValidator2] public class Entity An Entity has a series of fields of which not all are always shown, dependent on the selection from combo box. A validator exists for each of...

Which validation library for ASP.NET MVC?

Hi, I'm trying to decide what validation approach to take for a new ASP.NET MVC project. (And wow there are plenty of options!) The project uses NHibernate, so the first thing I considered was the NHibernate Validator (Because of tight integration with NHibernate). However, as far as I can see there are only a couple of benefits to th...

NHibernate Validator - passing resource manager and key.

Hi, According to the NHibernate Validator documentation here: http://nhforge.org/wikis/validator/nhibernate-validator-1-0-0-documentation.aspx I should be able to pass my resource manager so I can use that for validation error messages. See: Alternatively you can provide a ResourceManager while checking programmatically the valida...

nhibernate validator newbie question

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 Ru...

How to use Nhibernate Validator + NHib component + ddl

I just configured my NHibValidator. My NHibernate creates the DB schema. When I set MaxLenght="20" to some property of a class then in the database the length appears in the database column. I am doing this in the NHibValidator xml file. But the problem is that I have components and cannot figure out how to achieve this behaviour. The co...

xVal Date Validation with Nhibernate Validator

I am using xVal with NHibernate Validator and I have a hard time to validate the dates. First, NHibernate does not have validation for Date/DateTime formatting (except Past and Future). Second, I tried xVal itself (not using NHibernate Validator) but still no chance. I need to validate the date values (let's say in a text box), to mak...

NHibernate Validator Dynamic rules

I'm using Nhibernate and I have a requirement that the validation rules must change in time. The framework I'll use is NHibernate validator, but I don't really know how to make dynamic rules, the validation is quite simple with xml files or attributes in the entity class, but the catch is to make this rules updatable. Is there a way to a...

fluentnhibernate and nhibernate validator version error

We have a project using FluentNibernate to map the entities. Now I need to add some format validation to these maps. For Nullable, Length and such we are currently using the mappings. I added NHibernate Validator to the project, but received a compile time error about needing NHibernate version 2.1.2.4000. So I upgraded to that versio...

How to get interpolated message in NHibernate.Validator

Hi! I'm trying to integrate NHibernate.Validator with ASP.NET MVC client side validations, and the only problem I found is that I simply can't convert the non-interpolated message to a human-readable one. I thought this would be an easy task, but turned out to be the hardest part of the client-side validation. The main problem is that b...

System.NullReferenceException with WhoCanHelpMe Unit Test

I'm working with a test project based on WhoCanHelpMe, which is based on Sharp Architecture, NHibernateValidator, etc. As its written the when_the_profile_tasks_is_asked_to_create_a_profile unit test creates the profile object and saves it without issue. Now the profile object is a CreateProfileDetails type that derives from their own V...

ValidatorEngine.Validate returns null (no error) if configured its ValidatorMode.UseExternal

Hi i am integrating nhibernate validator into my application and and everything is fine with attributes but as soon as I create *.nhv.xml files and move my validation rules there (as embedded resource) ValidatorEngine.Validate(entity) returns wrong (actually nothing and my InvalidValue[] collection is empty I appropriate any comme...

NHibernate Validator and Schema Export question

I'm learning to use NHibernate validator and it's Fluent API (Loquacious). I have noticed is that I can't set an integer property or nullable int property (int?) to be not nullable. Well, why not? In a database, an integer column can have null values. Even worse, when I generate DDL using SchemaExport, the integer column wont be pickin...

NHibernate Validator and Null DateTime

There must be a simple solution out there, I'm trying to use NHibernate Validator attributes on my DateTime properties. If the value is null (via [NotNull]), I want it to fail validation. When I submit a null value it gets converted to 1/1/0001 12:00:00 AM and NHibernate doesn't pick that up as null. I guess I could write a custom valida...