Make a clear distinction between different layers of validation
In an older, but still very interesting article, Mattias Verraes has some interesting thoughts on form, command and model validation.
Many of the frameworks I’ve worked with, promise to separate responsibilities with MVC. In practice, they end up coupling everything to everything. The forms are coupled to the models, and there’s a grand unified validation layer. This may be convenient at first, but it breaks down for larger systems, and creates headaches when having to support multiple clients. My approach is to clearly separate the validation for the form itself, from the Command validation and the model validation.
http://verraes.net/2015/02/form-command-model-validation/
What are your thoughts on "Make a clear distinction between different layers of validation"?