|
|
@@ -27,7 +27,26 @@ public function rules(): array
|
|
|
'secondary_email' => 'sometimes|nullable|email|max:255',
|
|
|
'phone_number' => 'sometimes|required|string|max:20',
|
|
|
'cell_number' => 'sometimes|nullable|string|max:20',
|
|
|
- 'avatar' => 'sometimes|nullable|image|max:2048',
|
|
|
+ 'avatar' => 'sometimes|nullable|image|max:2048',
|
|
|
+ 'partners' => 'sometimes|nullable|array',
|
|
|
+ 'partners.*.name' => 'required|string|max:255',
|
|
|
+ 'partners.*.cpf' => 'required|string|max:20',
|
|
|
+ 'partners.*.social_name' => 'nullable|string|max:255',
|
|
|
+ 'partners.*.role' => 'nullable|string|max:100',
|
|
|
+ 'partners.*.rg' => 'nullable|string|max:30',
|
|
|
+ 'partners.*.birth_date' => 'nullable|date',
|
|
|
+ 'partners.*.participation' => 'nullable|numeric|min:0|max:100',
|
|
|
+ 'partners.*.email' => 'nullable|email|max:255',
|
|
|
+ 'partners.*.secondary_email'=> 'nullable|email|max:255',
|
|
|
+ 'partners.*.phone_number' => 'nullable|string|max:20',
|
|
|
+ 'partners.*.cell_number' => 'nullable|string|max:20',
|
|
|
+ 'partners.*.postal_code' => 'nullable|string|max:9',
|
|
|
+ 'partners.*.street' => 'nullable|string|max:255',
|
|
|
+ 'partners.*.address_number' => 'nullable|string|max:20',
|
|
|
+ 'partners.*.neighborhood' => 'nullable|string|max:255',
|
|
|
+ 'partners.*.complement' => 'nullable|string|max:255',
|
|
|
+ 'partners.*.city_id' => 'nullable|integer|exists:cities,id',
|
|
|
+ 'partners.*.state_id' => 'nullable|integer|exists:states,id',
|
|
|
];
|
|
|
|
|
|
if ($isCreate) {
|