Support for Firefox etc

Feb 21, 2009 at 2:41 PM
Hi Steve,

Great work with xVal this looks really promising, I have been having a few problems getting up to speed. I can get the BookingDemo application working with IE. However client side validation does not work with Firefox or Chrome. I also downloaded build 12010 to use with RC1 in my own project plus Castle Validator attributes and client side validation does not work in IE either. 

Do I have to register the Castle Validator Provider somewhere? I followed the instructions on your initial xVal demo replacing the DataAnnotations with CastleValidator attributes and writing my own server side runner. No problems on the server side so far.

Thanks

Ian
Coordinator
Feb 21, 2009 at 3:02 PM
Hi Ian

Not sure what's missing from your setup, but it does work fine with Firefox and Chrome (and IE of course). I'll be doing an updated release within the next week, which will include an updated demo project, so this should get you on your way when it comes.

To use Castle Validator on the server, you need to register the provider, e.g. in your Global.asax.cs file as follows:

protected void Application_Start()
{
    RegisterRoutes(RouteTable.Routes);
    xVal.ActiveRuleProviders.Providers.Clear();
    xVal.ActiveRuleProviders.Providers.Add(new CastleValidatorRulesProvider());
}

If you don't want to wait for the update next week, then please send me a small VS project that shows client-side validation not working in Firefox or Chrome and I'll see what the problem is.
Feb 21, 2009 at 4:17 PM
Hi Steve,

Thanks, everything now works great on my own project, tested in Chrome and Firefox also no problems. The code i was using was the demo off your blog. 

I was reading you changes about making the library work with RC1 which i hadn't realized was after the demo was released. Could it be that I have MVC RC installed and that is what is breaking the old demo?

Anyway, I think this library has great potential. Would love to see some ajax validation incorporating into it so that all errors can be displayed before the first submit is posted.

Cheers,

Ian