|
|
@@ -19,11 +19,29 @@ public function rules(): array
|
|
|
'street' => 'sometimes|nullable|string|max:255',
|
|
|
'address_number' => 'sometimes|nullable|string|max:20',
|
|
|
'neighborhood' => 'sometimes|nullable|string|max:255',
|
|
|
+ 'city_id' => 'sometimes|nullable|integer|exists:cities,id',
|
|
|
'state_id' => 'sometimes|nullable|integer|exists:states,id',
|
|
|
'complement' => 'sometimes|nullable|string|max:255',
|
|
|
'payer_name' => 'sometimes|nullable|string|max:255',
|
|
|
'how_did_you_know_us' => 'sometimes|nullable|string|in:referral,social_media,google,other',
|
|
|
'notes' => 'sometimes|nullable|string',
|
|
|
+
|
|
|
+ 'responsible' => 'sometimes|nullable|array',
|
|
|
+ 'responsible.name' => 'sometimes|nullable|string|max:255',
|
|
|
+ 'responsible.birth_date' => 'sometimes|nullable|date',
|
|
|
+ 'responsible.cpf' => 'sometimes|nullable|string|max:20',
|
|
|
+ 'responsible.gender' => 'sometimes|nullable|string|in:no_preference,male,female,other',
|
|
|
+ 'responsible.degree' => 'sometimes|nullable|string|max:255',
|
|
|
+ 'responsible.email' => 'sometimes|nullable|email',
|
|
|
+ 'responsible.phone' => 'sometimes|nullable|string|max:20',
|
|
|
+ 'responsible.postal_code' => 'sometimes|nullable|string|max:10',
|
|
|
+ 'responsible.street' => 'sometimes|nullable|string|max:255',
|
|
|
+ 'responsible.address_number' => 'sometimes|nullable|string|max:20',
|
|
|
+ 'responsible.neighborhood' => 'sometimes|nullable|string|max:255',
|
|
|
+ 'responsible.city_id' => 'sometimes|nullable|integer|exists:cities,id',
|
|
|
+ 'responsible.state_id' => 'sometimes|nullable|integer|exists:states,id',
|
|
|
+ 'responsible.complement' => 'sometimes|nullable|string|max:255',
|
|
|
+ 'responsible.notes' => 'sometimes|nullable|string',
|
|
|
];
|
|
|
|
|
|
if ($this->isMethod('post')) {
|