FIX_POLICY_TYPE_VALIDAION

This commit is contained in:
velz 2026-04-08 11:09:15 +05:30
parent 1b236ce376
commit 0d8418259d

View File

@ -506,7 +506,7 @@ class LeadsController extends BaseController
'errors' => ['required' => 'Claim Year is required for all entries.', 'regex_match' => 'Year must be in format YYYY-YYYY.'],
];
$rules['first_policy_type_.*'] = [
'rules' => 'required|regex_match[/^[a-zA-Z0-9_-]+$/]',
'rules' => 'required|regex_match[/^[a-zA-Z0-9 _-]+$/]',
'errors' => ['required' => 'Policy Type is required in Claim History.',
'regex_match' => 'Policy Type only letters, numbers, space, hyphens and underscores are allowed',
],
@ -517,7 +517,7 @@ class LeadsController extends BaseController
'regex_match' => 'Date of Loss must be inValid format.'],
];
$rules['first_cause_of_loss.*'] = [
'rules' => 'required|regex_match[/^[a-zA-Z0-9\s_-]+$/]',
'rules' => 'required|regex_match[/^[a-zA-Z0-9 _-]+$/]',
'errors' => [
'required' => 'Cause of Loss is required.',
'regex_match' => 'Cause of Loss only letters, numbers, space, hyphens and underscores are allowed',