kla/php-activerecord — pull request #218 by taddeus (2012-07-21 23:05:45+00:00)
Title: Implemented 'on' => 'save', 'on' => 'create' and 'on' => 'update' options for validations.

The Wiki states that a common option for validations is the 'on' option (see http://www.phpactiverecord.org/projects/main/wiki/Validations#commonalities). I noticed that this option was not implemented yet, and also found some reports of this on several forums. Since I did want to use the option without the use of dirty workarounds, I decided to implement it myself.

I don't really have the time to create additional unit tests for the implementation, but since it's in the Wiki these probably already exist (?). I did run all tests to check if the code is not broken, and they passed.