From 71d650292981d0935da52f9f484b8b6fd9ae8892 Mon Sep 17 00:00:00 2001 From: objecttothis <17935339+objecttothis@users.noreply.github.com> Date: Thu, 14 Nov 2024 02:22:33 +0400 Subject: [PATCH] Use custom rule to account for all locales (#4117) Signed-off-by: objecttothis --- app/Controllers/Sales.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Controllers/Sales.php b/app/Controllers/Sales.php index 41a1eb68d..0cf587b42 100644 --- a/app/Controllers/Sales.php +++ b/app/Controllers/Sales.php @@ -633,9 +633,9 @@ class Sales extends Secure_Controller $data = []; $rules = [ - 'price' => 'trim|required|numeric', - 'quantity' => 'trim|required|numeric', - 'discount' => 'trim|permit_empty|numeric', + 'price' => 'trim|required|decimal_locale', + 'quantity' => 'trim|required|decimal_locale', + 'discount' => 'trim|permit_empty|decimal_locale', ]; if($this->validate($rules))