ValidateOnException

ValidateOnException

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


st3fanus posted on Sunday, August 26, 2012

Hi all..

 

I want to know is it possible to prevent save a business object when there is a validate on exception error ?

 

thanks

JonnyBee replied on Monday, August 27, 2012

What do you mean by "validate on exception error"?

If the object is not IsValid then BeginSave and Save methods will fail with ValidationException.

st3fanus replied on Monday, August 27, 2012

Hi jonny..

thanks for quick response

 

I mean ValidateOnException is set to true on XAML will preven t wrong type data type is not continue to Business Object Property,

When I save this Business Object there is no error or preventive action happened,

So there is a solution to prevent this Business Object saved when there is an exception ?

 

thanks a lot jonny :)

JonnyBee replied on Monday, August 27, 2012

That would have to handled by your code as the CSLA object never gets the value.

So this it is all in you XAML code and you must handle it in your own code.

st3fanus replied on Tuesday, August 28, 2012

Thanks a lot jonny :)

 

Copyright (c) Marimer LLC