Adding missing afterValidate callback to behaviors, Fixes #3024

This commit is contained in:
Jose Lorenzo Rodriguez 2012-07-10 20:33:49 -04:30
parent 8fcb2a7653
commit 39715bcd89
3 changed files with 56 additions and 0 deletions

View file

@ -146,6 +146,17 @@ class ModelBehavior extends Object {
return true;
}
/**
* afterValidate is called just after model data was validated, you can use this callback
* to perform any data cleanup or preparation if needed
*
* @param Model $model Model using this behavior
* @return mixed False will stop this event from being passed to other behaviors
*/
public function afterValidate(Model $model) {
return true;
}
/**
* beforeSave is called before a model is saved. Returning false from a beforeSave callback
* will abort the save operation.