Can you check if entities are really invalid? In your case, I would expect that Address object properties will be set to empty strings, which is not caught by ValidateNonEmpty, you need ValidateLength for that. So you would have a non-null Address on the Invoice (passes non-empty validation), and Address.Street set to "" (passes non-empty validation, it would fail if Street == null)
if not that, can you try explicitly instantianting another ValidationRunner there and see what it says? On Tue, Jul 28, 2009 at 1:16 PM, bdaniel7 <[email protected]> wrote: > > HasValidationError( incident ) || HasValidationError > ( incident.Address ) return false. > > On Jul 28, 1:27 pm, Zdeslav Vojkovic <[email protected]> > wrote: > > validation is not performed in controller even during Save/Update? > > Or is just HasValidationError() returning false? > > > > > > > > On Tue, Jul 28, 2009 at 11:59 AM, bdaniel7 <[email protected]> wrote: > > > > > > Regarding client side validation, I am using it with Prototype (plan > to > > > > switch to JQuery) > > > > and it works fine, without interfering with server side validation. I > > > can't > > > > see how they > > > > could clash. When you submit a form, do you get to your action > method? > > > > > when jQuery pops in, the execution doesn't reach the controller. > > > jQuery validator executes first and prevents the form from being > > > submitted. > > > when jQuery (in Configure(IMonoRailConfiguration configuration) ) or > > > javascript are disabled, > > > the execution reaches the controller but no validation is performed. > > > > > public void Configure(IMonoRailConfiguration configuration) > > > { > > > configuration.JSGeneratorConfiguration > > > .AddLibrary("jquery-1.3.2", typeof(JQueryGenerator)) > > > .AddExtension(typeof(CommonJSExtension)) > > > .ElementGenerator > > > .AddExtension(typeof(JQueryElementGenerator)) > > > .Done > > > .BrowserValidatorIs(typeof(JQueryValidator)) > > > .SetAsDefault(); > > > } > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
