Fix upsert contact request and contact model type hint in accordance with DB constrains
This commit is contained in:
parent
98a80bee98
commit
b2e73f2ef2
2 changed files with 5 additions and 5 deletions
|
|
@ -67,11 +67,11 @@ class UpsertContactsRequest extends FormRequest
|
|||
'contacts' => 'present|array',
|
||||
'contacts.*' => 'array',
|
||||
'contacts.*.id' => 'nullable|uuid|exists:contacts,id',
|
||||
'contacts.*.name' => 'required|string|max:255',
|
||||
'contacts.*.lastname' => 'required|string|max:255',
|
||||
'contacts.*.firstname' => 'required|string|max:255',
|
||||
// * Dot not validate email here (soft validate), if it does not pass, app will be blocked.
|
||||
'contacts.*.email' => 'required|string|max:255',
|
||||
'contacts.*.phone' => 'required|string|max:255',
|
||||
'contacts.*.phone' => 'nullable|string|max:255',
|
||||
|
||||
// * DATA
|
||||
'contacts.*.data' => 'present|array',
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ use Kwaadpepper\Enum\Traits\CastsEnums;
|
|||
* @property string $email
|
||||
* @property string $lastname
|
||||
* @property string $firstname
|
||||
* @property string $phone
|
||||
* @property string|null $phone
|
||||
* @property array<\App\Lib\Inputs\Definition\Input> $data
|
||||
* @property string $notes
|
||||
* @property array<array<string,string>> $visits
|
||||
* @property string|null $notes
|
||||
* @property array<array<string,string>>|null $visits
|
||||
*/
|
||||
class Contact extends Model
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue