chore: custom validation error messages

This commit is contained in:
2025-06-05 02:53:04 +01:00
parent b70bdba0dc
commit a67726919d
4 changed files with 45 additions and 12 deletions
+3 -1
View File
@@ -1,6 +1,8 @@
package models
import (
"strings"
"github.com/hazemKrimi/crimson-vault/internal/types"
)
@@ -77,7 +79,7 @@ func (db *DB) UpdateUserSecurityDetails(id int, body types.UpdateUserSecurityDet
}
result = db.instance.Model(user).Updates(types.User{
Username: body.Username,
Username: strings.ToLower(body.Username),
Password: body.Password,
})