Surely the simpler solution is to just clear the errors object according to the user or role?
Clearing the Errors collection presents a converse problem: you'd need to verify that everything that's necessary for this user to fill out is, in fact, filled out - and if so, clear the Errors collection. This means writing every data validation expression in code, which may or may not be harder, depending on the scenario.
Fair point, but in my case I actually disable validation completely for certain users (or if they press the hold button).
So the Errors.Clear() function works really well for me. :-)
by the way, thanks for the posts to my blog.
Bruce, this makes sense. Clearning the Errors collection then seems like a perfect fit for your scenario.
One thing to remember, though - don't forget that the Errors collection is not persisted. This means that if a customer who's not supposed to see any errors saves the form and then loads it back may see the validation messages again! To go around this issue, place your validation-disabling logic into the onLoad code, too.
If you're interested to learn more about the Errors collection, take a look at an excellent article by Kristof Kristof De Causemaeker: http://spsfactory.blogspot.com/2006/11/formerrorcollection-errors-property.html