CHANGE_the Pre-Enrolment app - the Mobile and Email already exits alerts are showing even before entering any text :GWM

This commit is contained in:
Gowtham M 2025-08-19 15:44:22 +05:30
parent 1b6f29a63e
commit cfbf7fada2

View File

@ -133,6 +133,9 @@ class ClientController extends AdminController
$field = $this->request->getPost('field');
$value = $this->request->getPost('value');
if($value == '')
return $this->response->setJSON(['isDuplicate' => false]);
// Load the database if not already loaded
$db = db_connect();