Validating data that provides
Access provides a number of ways to restrict input: You can use these methods of validating data alone or in combination with each other.Data types are not optional, and provide the most basic type of data validation.To ensure that the application is robust against all forms of input data, whether obtained from the user, infrastructure, external entities or database systems. This weakness leads to almost all of the major vulnerabilities in applications, such as Interpreter Injection, locale/Unicode attacks, file system attacks and buffer overflows.
It sounds like you are really struggling with a design decision based on the "academic" definition of a DTO as opposed to some kind of pragmatic requirement. When faced with similar situations I generally tend to carry out the implementation in the most simple and straight forward way as I can avoiding things like complex tightly coupled relationships and excessive amounts of design.You need data validation, for example, when you process incoming data whose origin isn't certified or whose content layout isn't completely predictable (i.e., cases in which the text that users type at runtime determines the XML data layout). NET, you must use the Xml Validating Reader class, which derives from the Xml Text Reader class and works in much the same way.