refactor(employees): simplify validation rules for employee requests
Removed regex patterns from validation rules for employeeId, establishment, siteId, and serviceId to streamline input handling.
This commit is contained in:
parent
38ca7ed069
commit
3100643eac
2 changed files with 4 additions and 4 deletions
|
|
@ -14,7 +14,7 @@ final class EmployeeShowRequest extends FormRequest
|
|||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'employeeId' => ['required', 'string', 'regex:/^\d{7,8}$/'],
|
||||
'employeeId' => ['required', 'string'],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ final class EmployeesIndexRequest extends FormRequest
|
|||
'sortDirection' => ['sometimes', Rule::in(['Ascending', 'Descending'])],
|
||||
'direction' => ['sometimes', Rule::in(['Ascending', 'Descending'])],
|
||||
'since' => ['sometimes', 'date'],
|
||||
'establishment' => ['sometimes', 'string', 'regex:/^[\dA-Z]{2,}$/'],
|
||||
'siteId' => ['sometimes', 'string', 'regex:/^[A-Z]{2,}$/'],
|
||||
'serviceId' => ['sometimes', 'string', 'regex:/^\d{1,}$/'],
|
||||
'establishment' => ['sometimes', 'string'],
|
||||
'siteId' => ['sometimes', 'string'],
|
||||
'serviceId' => ['sometimes', 'string'],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue