From b2a3c30e2480bc7959faec2fa916b73fe48cd445 Mon Sep 17 00:00:00 2001 From: xl Date: Sat, 6 May 2023 17:20:51 +0800 Subject: [PATCH] e --- BaseValidator.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/BaseValidator.php b/BaseValidator.php index 6adb734..bdc4a75 100644 --- a/BaseValidator.php +++ b/BaseValidator.php @@ -92,11 +92,12 @@ abstract class BaseValidator return $this; } - /** - * @param $field - * @param $message - * @return bool - */ + /** + * @param $field + * @param $message + * @return bool + * @throws \ReflectionException + */ public function addError($field, $message): bool { $this->isFail = FALSE; @@ -105,6 +106,7 @@ abstract class BaseValidator $message = str_replace(':attribute', $field, $message); } + \addError($message,"mysql"); $this->message = $message; return $this->isFail;