Data Annotations vs. Castle with jQuery client-side validation

Apr 10, 2009 at 10:15 PM
I have been having trouble getting all of the client-side validations to work correctly with the Castle.Components.Validator.  They all were working fine with Data Annotations but a need for some specific features has me converting to Castle.  I added the corresponding attributes to the data model and now required fields that are empty, date fields in the wrong format and integers out of range don't trigger any client-side validation.  The only client side validation I see is when I enter a letter in an integer field.  Any help would be appreciated.

Apr 10, 2009 at 11:03 PM
Edited Apr 10, 2009 at 11:04 PM
I had to add the following line to get Castle Validators to work:

         protected void Application_Start()
            xVal.ActiveRuleProviders.Providers.Add(new CastleValidatorRulesProvider());
Apr 14, 2009 at 6:46 PM
That worked.  Thanks for your help.