From ff58f2392a81966675724ccd8a90a1c4e678439e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 25 Feb 2022 17:17:29 +0800 Subject: [PATCH] modify plugin name --- BaseValidator.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BaseValidator.php b/BaseValidator.php index 7bf7702..b1ade6b 100644 --- a/BaseValidator.php +++ b/BaseValidator.php @@ -103,7 +103,9 @@ abstract class BaseValidator { $this->isFail = FALSE; - $message = str_replace(':attribute', $field, $message); + if (!is_null($field)) { + $message = str_replace(':attribute', $field, $message); + } $this->message = $message;