Implemented 'on' => 'save', 'on' => 'create' and 'on' => 'update' options for validations.

The work of @taddeus as submitted in #218, but now rebased with master and with updated tests.