Data Annotations vs. Castle with jQuery client-side validation

Apr 10, 2009 at 9: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.

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

         protected void Application_Start()
        {
            RegisterRoutes(RouteTable.Routes);
            xVal.ActiveRuleProviders.Providers.Add(new CastleValidatorRulesProvider());
        }
 
Apr 14, 2009 at 5:46 PM
That worked.  Thanks for your help.