Has anyone come up with the need to seperate validation rules by type? Let me explain, I have a very common scenario - a user BO that, on insert, needs to check one set of rules (like username exists or email address exists) but on update you do not want to check these rules. So, what is the separation mechanism?
Also, rules are normally checked only if you either explicitly call ValidationRules.CheckRules(), or if the property associate with the rule changes.
In the case of an update type operation, I don't call CheckRules() on an object loaded from the database, so the only rules associated with the changes are called.
It's possible to be very creative, though. You can associate rules with non-existent property names, so they are never automatically called. If you want to call them yourself, you can call CheckRules just for that "pseudo" property. Some people here have used this to do server-side specific processing if I recall correctly.
Copyright (c) Marimer LLC