Override IsValid

Override IsValid

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


fargs posted on Monday, July 03, 2006

Hi,

I have run into an issue. I love the way the validation rules work but I would need to persist the data regardless of the IsValid state of the object. Is there a work around for this?

Les

Igor replied on Monday, July 03, 2006

Yes, override IsValid.

fargs replied on Thursday, July 06, 2006

I just override the save method for the object and removed the check if it is valid. It will now always persist the object. And when I get or create a new object I call validation.checkrules to get my broken rules list.

 

Copyright (c) Marimer LLC