mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Allowing behavior methods to be used in model validation (Ticket #3178)
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5651 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
8237bf51e3
commit
1791a378c0
1 changed files with 1 additions and 1 deletions
|
@ -1723,7 +1723,7 @@ class Model extends Overloadable {
|
|||
$valid = true;
|
||||
$msg = null;
|
||||
|
||||
if (method_exists($this, $rule)) {
|
||||
if (method_exists($this, $rule) || isset($this->__behaviorMethods[$rule]) || isset($this->__behaviorMethods[low($rule)])) {
|
||||
$ruleParams[] = array_diff_key($validator, $default);
|
||||
$valid = call_user_func_array(array(&$this, $rule), $ruleParams);
|
||||
} elseif (method_exists($Validation, $rule)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue