031e499819
API CI/CD / Validate (composer + pint) (push) Successful in 3m10s
API CI/CD / Test (PHPUnit) (push) Failing after 6m49s
API CI/CD / Build frontend assets (push) Successful in 1m3s
API CI/CD / Security audit (push) Failing after 1m0s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
26 lines
911 B
PHP
26 lines
911 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Staff;
|
|
|
|
use App\Http\Requests\ApiFormRequest;
|
|
|
|
class StaffStoreRequest extends ApiFormRequest
|
|
{
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'user_id' => ['nullable', 'integer', 'min:1'],
|
|
'firstname' => ['required', 'string', 'max:100'],
|
|
'lastname' => ['required', 'string', 'max:100'],
|
|
'email' => ['required', 'email', 'max:150'],
|
|
'phone' => ['nullable', 'string', 'max:20'],
|
|
'password' => ['nullable', 'string', 'min:8', 'max:120'],
|
|
'role_id' => ['nullable', 'integer', 'min:1', 'exists:roles,id'],
|
|
'role_name' => ['nullable', 'required_without:role_id', 'string', 'max:100'],
|
|
'school_year' => ['required', 'string', 'max:20'],
|
|
'school_year_id' => ['prohibited'],
|
|
'status' => ['nullable', 'string', 'max:40'],
|
|
];
|
|
}
|
|
}
|