I have a WCF service defining a number of methods, and i would like to validate all input (against say a regex) to ensure all data getting into the service is valid.
I use the various enterprise library validation attributes on the data contracts so that this can be handled relatively painlessly.
What is the prescribed method for communicating any failures of validation back to the client? Is it possible that raising a fault is not the right thing to do (even raising ValidationFault, no matter how applicable it may seem!) as this is using exceptions
to control program flow?
If this is not an acceptable manner of communicating validation failure back to the client, then what
is the recommended practice?
Thanks for any help guys, will be much appreciated!