mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
改进Validate类的错误信息处理
This commit is contained in:
@@ -1222,9 +1222,9 @@ class Validate
|
|||||||
$msg = Lang::get(substr($msg, 2, -1));
|
$msg = Lang::get(substr($msg, 2, -1));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_string($msg) && is_string($rule) && false !== strpos($msg, ':')) {
|
if (is_string($msg) && is_scalar($rule) && false !== strpos($msg, ':')) {
|
||||||
// 变量替换
|
// 变量替换
|
||||||
if (strpos($rule, ',')) {
|
if (is_string($rule) && strpos($rule, ',')) {
|
||||||
$array = array_pad(explode(',', $rule), 3, '');
|
$array = array_pad(explode(',', $rule), 3, '');
|
||||||
} else {
|
} else {
|
||||||
$array = array_pad([], 3, '');
|
$array = array_pad([], 3, '');
|
||||||
|
|||||||
Reference in New Issue
Block a user