From 4d3ab4dda2e628c63b54ffec02604f8d7190eae0 Mon Sep 17 00:00:00 2001
From: erik <erik.seiert@meissa-gmbh.de>
Date: Thu, 7 Dec 2023 11:24:47 +0100
Subject: [PATCH] Update Validate()

---
 models/activitypub/actor.go | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/models/activitypub/actor.go b/models/activitypub/actor.go
index 3e4086d922..5fe955c471 100644
--- a/models/activitypub/actor.go
+++ b/models/activitypub/actor.go
@@ -38,14 +38,14 @@ Validate collects error strings in a slice and returns this
 */
 func (a ActorID) Validate() []string {
 
-	err := make([]string, 0, 3) // ToDo: Solve this dynamically
+	var err = []string{}
 
-	if res := a.validate_is_not_empty(a.schema, "schema"); res != nil {
-		err = append(err, res.Error())
+	if res := validate_is_not_empty(a.schema); res != nil {
+		err = append(err, strings.Join([]string{res.Error(), "for schema field"}, " "))
 	}
 
-	if res := a.validate_is_not_empty(a.host, "host"); res != nil {
-		err = append(err, res.Error())
+	if res := validate_is_not_empty(a.host); res != nil {
+		err = append(err, strings.Join([]string{res.Error(), "for host field"}, " "))
 	}
 
 	switch a.source {