views:

244

answers:

1

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 make sure it's a valid date. For instance, 13/01/2010 or 11/31/2010 are not valid dates.

I have tried creating new rules for NHibernate Validator by extending a new class, but it needs to be declared in the xVal client side too. I don't like to overwrite the existing scripts, if possible. I also used xval's [DataType(DataType.Date)] but it doesn't check if the date is valid!

Any suggestions?

A: 

After spending some time on this issue, here is the answer to my question: Custom Validation in xVal

Amin Emami