Validation Rule not firing

Validation Rule not firing

Old forum URL: forums.lhotka.net/forums/t/10273.aspx


Pavel posted on Monday, April 18, 2011

Hi everybody,

I have a collection with children. Child has a validation rule that  if it is more than 20 notify user that it's not allowed.

I create a property SumAll and calculate it like SumAll=Prop1+Prop2

The custom validation rule run against this calculated property value.

Collection is bound to grid.

Validation is working if properties updated manually entering value to a grid control.

If I populate collection with children from a database nothing happened.....what did I do wrong?

I am using CSLA 3.6.2.0

Thanks

JonnyBee replied on Tuesday, April 19, 2011

In your Fetch method you need to call ValidationRules.CheckRules() in order to execute the rules.

 

Pavel replied on Tuesday, April 19, 2011

JonnyBee

In your Fetch method you need to call ValidationRules.CheckRules() in order to execute the rules.

 

I did it in every possible place in my Child class....did not help.

 

 

Copyright (c) Marimer LLC