mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 16:22:16 +01:00
40 lines
929 B
PHP
40 lines
929 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Requests\V1\Member;
|
|
|
|
use App\Enums\Role;
|
|
use App\Models\Organization;
|
|
use Illuminate\Contracts\Validation\ValidationRule;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
/**
|
|
* @property Organization $organization
|
|
*/
|
|
class MemberUpdateRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array<string, array<string|ValidationRule|\Illuminate\Contracts\Validation\Rule>>
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'billable_rate' => [
|
|
'nullable',
|
|
'integer',
|
|
'min:0',
|
|
],
|
|
'role' => [
|
|
'required',
|
|
'string',
|
|
// TODO: placeholder role should not be allowed
|
|
Rule::enum(Role::class),
|
|
],
|
|
];
|
|
}
|
|
}
|