mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进自定义错误信息的判断
This commit is contained in:
@@ -408,7 +408,9 @@ class Validate
|
|||||||
return $message;
|
return $message;
|
||||||
} elseif (true !== $result) {
|
} elseif (true !== $result) {
|
||||||
// 返回自定义错误信息
|
// 返回自定义错误信息
|
||||||
$result = str_replace([':attribute', ':rule'], [$title, (string) $rule], $result);
|
if (is_string($result) && false !== strpos($result, ':')) {
|
||||||
|
$result = str_replace([':attribute', ':rule'], [$title, (string) $rule], $result);
|
||||||
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
Reference in New Issue
Block a user