From f50f77494b608cc2bd677a10b28f45e4493ce53a Mon Sep 17 00:00:00 2001 From: Reza Date: Tue, 29 Oct 2024 12:58:42 +0100 Subject: [PATCH] validator unique columns --- lib/validation/validators.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/validation/validators.go b/lib/validation/validators.go index 08b60f0..ff80538 100644 --- a/lib/validation/validators.go +++ b/lib/validation/validators.go @@ -28,7 +28,7 @@ var DBValidators = map[*regexp.Regexp]func(match []string, value *generic.Value, } func uniqueColumnsValidator(match []string, value *generic.Value, stmt *gorm.Statement, field *schema.Field) error { - var columns = strings.Split(match[1], ",") + var columns = strings.Split(match[1], "|") evo.Dump(columns) evo.Dump(match) var model = db.Debug().Table(stmt.Table)