Typically I have added data validation, such as checking that an input is within a certain range, in the data models found in my Data Access Layer. Searching the web I've seen that there are two schools of thought on the matter:
- Adding the validation as part of the Data Access Layer (like I have been doing)
- Adding the validation as part of the Business Layer
I can see good arguments on both sides, but in order to maintain a true separation of concerns, what is the recommended approach? Is there a one size fits all solution to this? or is it like most things and you have to analyze on a case by case basis?