fix: 🐛 overwrite customer rules to assert email exist when update informations #314
This commit is contained in:
parent
d663536123
commit
0d100e0d89
1 changed files with 2 additions and 0 deletions
|
|
@ -30,6 +30,7 @@ class UpdateCustomerRequest extends StoreCustomerRequest
|
|||
'answers' => collect($this->input('answers'))->map(function (string $value) {
|
||||
return intval($value);
|
||||
})->toArray(),
|
||||
'email' => auth()->user()->email,
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
@ -45,6 +46,7 @@ class UpdateCustomerRequest extends StoreCustomerRequest
|
|||
'question_id' => 'required|integer',
|
||||
'answers' => 'present|array',
|
||||
'answers.*' => 'integer|min:0',
|
||||
'email' => 'required|email:rfc,dns,spoof|max:255|exists:customers,email',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue