diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index 4c9edd8d..8879cda2 100755 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -2474,11 +2474,11 @@ class ClientController extends AdminController ] ], 'name.*' => [ - 'rules' => 'required|min_length[3]|regex_match[/^[a-zA-Z0-9\s\-_]+$/]', + 'rules' => 'required|min_length[3]|regex_match[/^[a-zA-Z0-9\s.\-_]+$/]', 'errors' => [ 'required' => 'Contact name is required', 'min_length' => 'Contact name must be at least 3 characters long', - 'regex_match' => 'Contact name can only contain letters, numbers, spaces, hyphens and underscores.' + 'regex_match' => 'Contact name can only contain letters, numbers, spaces, periods, hyphens and underscores.' ] ], 'designation.*' => [ @@ -2658,11 +2658,11 @@ class ClientController extends AdminController ] ], 'name.*' => [ - 'rules' => 'required|min_length[3]|regex_match[/^[a-zA-Z0-9\s\-_]+$/]', + 'rules' => 'required|min_length[3]|regex_match[/^[a-zA-Z0-9\s.\-_]+$/]', 'errors' => [ 'required' => 'Contact name is required', 'min_length' => 'Contact name must be at least 3 characters long', - 'regex_match' => 'Contact name can only contain letters, numbers, spaces, hyphens and underscores.' + 'regex_match' => 'Contact name can only contain letters, numbers, spaces, periods, hyphens and underscores.' ] ], 'designation.*' => [ diff --git a/app/Views/client_branch.php b/app/Views/client_branch.php index 61f5ec37..f3ada156 100755 --- a/app/Views/client_branch.php +++ b/app/Views/client_branch.php @@ -202,7 +202,7 @@ input:checked + .slider-branch-contact:before { @@ -265,8 +265,8 @@ input:checked + .slider-branch-contact:before { + data-parsley-pattern="^[A-Za-z\s.]+$" + data-parsley-pattern-message="Contact name may contain only letters, spaces, and periods.">