|string> */ public function rules(): array { Log::info("CreateCustomerRequest: " . json_encode($this->all())); return [ // 'id' => 'required|array', // 'id.id' => 'required|uuid', // 'id.entityType' => 'required|string|in:CUSTOMER', 'country' => 'required|string', 'state' => 'required|string|max:255', 'city' => 'required|string|max:255', 'address' => 'required|string|max:255', 'address2' => 'nullable|string|max:255', 'zip' => 'required|string|max:20', 'phone' => 'nullable|string|max:20', 'email' => 'required|email|max:255', 'title' => 'required|string|max:255', // 'tenantId' => 'required', // 'tenantId.id' => 'required|uuid', // 'tenantId.entityType' => 'required|string|in:TENANT', // 'version' => 'required|integer|min:1', // 'additionalInfo' => 'nullable|array', ]; } /** * Handle a failed validation attempt. * * @param \Illuminate\Contracts\Validation\Validator $validator * @throws \Illuminate\Http\Exceptions\HttpResponseException */ protected function failedValidation(Validator $validator) { throw new HttpResponseException(jsonResponseWithErrorMessage(implode(', ', $validator->errors()->all()), 422)); } }