mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-08-27 06:32:39 +00:00
Adding missing afterValidate callback to behaviors, Fixes #3024
This commit is contained in:
parent
8fcb2a7653
commit
39715bcd89
3 changed files with 56 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue