cakephp/cakephp — pull request #2539 by lorenzo (2013-12-23 22:59:24+00:00)
Title: 3.0 - revisit validation

This PR extracts the code for validating entities into a separate `EntityValidator` object. Also exposes new methods for the Table class: `validate` and `validateMany`. With this set of changes, now we have a replacement for the `'validate' => 'first'` option from 2.x, which is no more. Now you are required to call `validate` yourself if you want the messages in advance or let the save method do validation for you while saving. Finally I enabled `Entity::errors` to get error messages in nested entities.

While I still think validation done correctly is hard, I think this give better control to the user over the process. If you have any suggestions please leave them in the comments.