From 0c6b696bfd60ec9557a8661361f26791be27225a Mon Sep 17 00:00:00 2001 From: azhar bhat Date: Thu, 13 Feb 2025 15:26:27 +0530 Subject: [PATCH] Fix #2536: Prevent user from entering negative values and add description to input field to clarify the use of zero. --- controllers/admin/AdminPPreferencesController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controllers/admin/AdminPPreferencesController.php b/controllers/admin/AdminPPreferencesController.php index 98ec9c7ebf..8838f3ef3e 100644 --- a/controllers/admin/AdminPPreferencesController.php +++ b/controllers/admin/AdminPPreferencesController.php @@ -85,11 +85,12 @@ public function __construct() 'PS_PRODUCT_SHORT_DESC_LIMIT' => array( 'title' => $this->l('Max size of short description'), 'hint' => $this->l('Set the maximum size of room type short description (in characters).'), - 'validation' => 'isInt', + 'validation' => 'isUnsignedInt', 'cast' => 'intval', 'type' => 'text', 'suffix' => $this->l('characters'), 'class' => 'fixed-width-xl', + 'desc' => $this->l('Set 0 for no limit'), ), /*'PS_QTY_DISCOUNT_ON_COMBINATION' => array( 'title' => $this->l('Quantity discounts based on'),