From 093d195fe8f630f5e386944d2f6381650a060302 Mon Sep 17 00:00:00 2001 From: michalsn Date: Mon, 6 Jul 2020 21:59:00 +0200 Subject: [PATCH] Fix CLI::validate() usage when using dot. Fixes #3233 --- system/CLI/CLI.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/CLI/CLI.php b/system/CLI/CLI.php index 65f627b36df3..3b9a7a26eb89 100644 --- a/system/CLI/CLI.php +++ b/system/CLI/CLI.php @@ -305,8 +305,10 @@ public static function prompt(string $field, $options = null, string $validation */ protected static function validate(string $field, string $value, string $rules): bool { + $label = $field; + $field = 'temp'; $validation = \Config\Services::validation(null, false); - $validation->setRule($field, null, $rules); + $validation->setRule($field, $label, $rules); $validation->run([$field => $value]); if ($validation->hasError($field))