Good example

Posts   
 
    
rboarman
User
Posts: 83
Joined: 01-Feb-2005
# Posted on: 02-May-2007 19:04:02   

This is a great example of how to use your technology. Unfortunately it does not have any calls to OnValidateFieldValue.

Am I missing something?

Rick

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39922
Joined: 17-Aug-2003
# Posted on: 02-May-2007 21:49:23   

What do you mean with 'this' ? simple_smile I think you wanted to post a message in a thread but instead started a new thread?

Anyway, the OnValidateFieldValue is called every time you set a value in an entity and the value passes the internal checks (length checks in string fields etc.)

So when you do: myOrder.OrderDate = DateTime.Now;

the OnValidateFieldValue method is called. If a validator object is set for the myOrder entity, the ValidateFieldValue method of the validator is called by that method. If true is returned, the value is accepted, if false is returned, the value is rejected and the field isn't set. Please also see the reference manual for further details.

Frans Bouma | Lead developer LLBLGen Pro
rboarman
User
Posts: 83
Joined: 01-Feb-2005
# Posted on: 02-May-2007 22:02:34   

Sorry. This should be part of thread 9807 and can be moved if possible.