diff --git a/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php b/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php index f75670fd7..f105d2420 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php @@ -349,6 +349,11 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController // max age of infant after which guest will considered as child // below 18 $globalChildMaxAge = Tools::getValue('WK_GLOBAL_CHILD_MAX_AGE'); $globalMaxChildInRoom = Tools::getValue('WK_GLOBAL_MAX_CHILD_IN_ROOM'); + if (!Validate::isUnsignedInt($globalChildMaxAge)) { + $this->errors[] = $this->l('Invalid value for "Consider guest as child below age".'); + } else if ($globalChildMaxAge <= 0) { + $this->errors[] = $this->l('The value for "Consider guest as child below age" must be at least 1.'); + } // End occupancy fields validation diff --git a/themes/hotel-reservation-theme/_partials/occupancy_field.tpl b/themes/hotel-reservation-theme/_partials/occupancy_field.tpl index 1ffa6f022..9b9c77142 100644 --- a/themes/hotel-reservation-theme/_partials/occupancy_field.tpl +++ b/themes/hotel-reservation-theme/_partials/occupancy_field.tpl @@ -64,7 +64,7 @@ -