You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function createValidator
line: 214elseif (!isset(static::$builtInValidators[$type]) && $model->hasMethod($type)) // incorrect logic
What is the expected result?
use overwritten method
see version 2.0.9 :
if ($type instanceof \Closure || $model->hasMethod($type)) {
What do you get instead?
it uses base method
Additional info
Q
A
Yii version
latest
PHP version
PHP 8
Operating system
linux
The text was updated successfully, but these errors were encountered:
mit40
changed the title
The model attributes validation do not use custom Validator.
The model attributes validation do not use custom validator.
Nov 2, 2023
yeah, based on v2.0.9, you can override built in
but after v2.0.36, you cannot override builtin validator, because of #14370 issue
so you may change the custom name validator
What steps will reproduce the problem?
see
file
yiisoft/yii2/validators/Validator.php
What is the expected result?
use overwritten method
see version 2.0.9 :
What do you get instead?
it uses base method
Additional info
The text was updated successfully, but these errors were encountered: