> */ 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), ], ]; } public function getBillableRate(): ?int { $input = $this->input('billable_rate'); return $input !== null && $input !== 0 ? (int) $this->input('billable_rate') : null; } }