SelfValidation versus Built-in Validation

Topics: Validation Application Block
Feb 4, 2008 at 7:35 PM

I have a WCF web service that uses Validation Application Block. When a built-in attribute validator like 'StringLengthValidator' fails, it throws a FaultException<ValidationFault> which is ok. But when a SeftValidation function validation fails, I populate a ValidationResults object which is returned when I do a ".Validate".

Here's the question, on the client side I catch a FaultException<ValidationFault> when the built-in attribute validation fails. But what about when the SelfValidation fails? Should the WebMethod return a "ValidationResults" object? Or should I loop through the "ValidationResults" object and throw a "FaultException<ValidationFault>" to the client?