From 415c272bdf50072bb62defef1fee0b4ce5cac406 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Fri, 13 Feb 2026 17:48:08 +0530 Subject: [PATCH] FIX_ISSUE --- app/Controllers/TicketController.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Controllers/TicketController.php b/app/Controllers/TicketController.php index d93a7b81..56842b57 100644 --- a/app/Controllers/TicketController.php +++ b/app/Controllers/TicketController.php @@ -3180,11 +3180,12 @@ class TicketController extends BaseController ], 'url.*' => [ 'label' => 'URL', - 'rules' => 'required', + 'rules' => 'if_exist|required|regex_match[/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/]', 'errors' => [ - 'required' => 'URL is required', + 'required' => 'URL is required.', + 'regex_match' => 'The URL format is invalid. Example: www.google.com or https://google.com' ] - ] + ], ]; if (!$this->validate($rules)) {