From 255f812078d6ac447f8c8fda2b0c2cb28599d074 Mon Sep 17 00:00:00 2001 From: qowevisa Date: Thu, 31 Oct 2024 11:05:06 +0200 Subject: [PATCH] Add clarity to cards errors --- db/card.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/card.go b/db/card.go index e287a64..b957c33 100644 --- a/db/card.go +++ b/db/card.go @@ -33,8 +33,8 @@ func (c *Card) SetUserID(id uint) { } var ( - ERROR_CARD_NAME_EMPTY = errors.New("Card's name can't be empty") - ERROR_CARD_NAME_NOT_UNIQUE = errors.New("Card's name have to be unique for user") + ERROR_CARD_NAME_EMPTY = errors.New("The 'Name' field for 'Card' cannot be empty") + ERROR_CARD_NAME_NOT_UNIQUE = errors.New("The 'Name' field for 'Card' have to be unique for user") ) func (c *Card) BeforeSave(tx *gorm.DB) error {