Validation

Posts   
 
    
pilotboba
User
Posts: 434
Joined: 05-Aug-2005
# Posted on: 13-Sep-2005 23:40:14   

Is it really necessary to use the seperate validator classes?

When is the validator called for fields? What the value is set? Would it be cleaner to just override the property setter to validate the value? Are the validator classes automatically used?

Same question for entity level validation. Wouldn't it be just as easy to override validate and return a bool. I'm not sure the reason to create a class for this. In most cases I doubt you would need some type of reusable entity validation.

BOb

Paul.Lewis
User
Posts: 147
Joined: 22-Aug-2005
# Posted on: 14-Sep-2005 04:54:37   

The LLBLGen User Manual has a very detailed page outlining the philosophy and usage of the validator classes:

Generated code - Validation per field or per entity

Validators aren't required but can be very useful.