validateRequest($value['Invoice'], CompanyLevel::class); foreach ($errors as $key => $msg) { $this->validator->errors()->add( "e_invoice.{$key}", "{$key} - {$msg}" ); } } } /** * Set the current validator. */ public function setValidator(Validator $validator): static { $this->validator = $validator; return $this; } }