From 9857fac4b95d86a8d4f5655c4ce45aa2ef8ef028 Mon Sep 17 00:00:00 2001 From: ste87 Date: Mon, 9 Mar 2026 12:40:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Checkout.php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Checkout.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Checkout.php b/Checkout.php index cd0ea8d..3108298 100644 --- a/Checkout.php +++ b/Checkout.php @@ -194,6 +194,9 @@ class Checkout extends Component $validationRules = array_merge($validationRules, explode('|', $config['validation'])); } } + if ($config['name'] === 'hostname') { + $validationRules = ['required', 'string', 'regex:/^[a-zA-Z0-9]+\.[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*$/']; + } if (count($validationRules) > 0) { $rules["checkoutConfig.{$config['name']}"] = $validationRules; }