I have a general question on where to put validation.
I have an asp.net mvc that gets/sets data from/to a DataSet. Currently, the fields in the form are validated by the form itself (e.g. for invalid length, range, etc.). Is it a good or better idea to transfer these validation checks into the DataSet? The downside is I need to trigger update calls to the DataSet in order to get the column with errors. In using forms, I can catch the error earlier.
Or should I use validation for both of them?
For additional consideration - it's possible I will be re-using this Dataset assembly with another project (a WCF service?). And I'd like to re-use the same validation code when possible.