Fix 419 Page Expired errors by appending CSRF token to FormData and remove required validation on profile image and contact info fields

This commit is contained in:
2026-04-30 12:57:37 +08:00
parent 8d32222d4f
commit 45cd7dc795
417 changed files with 19037 additions and 14378 deletions

View File

@@ -234,17 +234,17 @@ class EmployeeController extends Controller
'employee_status' => 'required|string|max:50',
// Contact information
'address_line_1' => 'required|string|max:255',
'city' => 'required|string|max:100',
'state' => 'required|string|max:100',
'country' => 'required|string|max:100',
'postal_code' => 'required|string|max:20',
'emergency_contact_name' => 'required|string|max:255',
'emergency_contact_relationship' => 'required|string|max:100',
'emergency_contact_number' => 'required|string|max:20',
'address_line_1' => 'nullable|string|max:255',
'city' => 'nullable|string|max:100',
'state' => 'nullable|string|max:100',
'country' => 'nullable|string|max:100',
'postal_code' => 'nullable|string|max:20',
'emergency_contact_name' => 'nullable|string|max:255',
'emergency_contact_relationship' => 'nullable|string|max:100',
'emergency_contact_number' => 'nullable|string|max:20',
// Banking information
'bank_name' => 'required|string|max:255',
'bank_name' => 'nullable|string|max:255',
'account_holder_name' => 'nullable|string|max:255',
'account_number' => 'nullable|string|max:50',
'bank_identifier_code' => 'nullable|string|max:50',
@@ -558,14 +558,14 @@ class EmployeeController extends Controller
'employee_status' => 'required|string|max:50',
// Contact information
'address_line_1' => 'required|string|max:255',
'city' => 'required|string|max:100',
'state' => 'required|string|max:100',
'country' => 'required|string|max:100',
'postal_code' => 'required|string|max:20',
'emergency_contact_name' => 'required|string|max:255',
'emergency_contact_relationship' => 'required|string|max:100',
'emergency_contact_number' => 'required|string|max:20',
'address_line_1' => 'nullable|string|max:255',
'city' => 'nullable|string|max:100',
'state' => 'nullable|string|max:100',
'country' => 'nullable|string|max:100',
'postal_code' => 'nullable|string|max:20',
'emergency_contact_name' => 'nullable|string|max:255',
'emergency_contact_relationship' => 'nullable|string|max:100',
'emergency_contact_number' => 'nullable|string|max:20',
// Banking information
'bank_name' => 'nullable|string|max:255',