updated error messages

This commit is contained in:
Gani Georgiev
2024-11-25 11:28:20 +02:00
parent 5a5211d7f2
commit fab334fca6
14 changed files with 36 additions and 31 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ func UploadedFileSize(maxBytes int64) validation.RuleFunc {
if v.Size > maxBytes {
return validation.NewError(
"validation_file_size_limit",
fmt.Sprintf("Failed to upload %q - the maximum allowed file size is %v bytes.", v.OriginalName, maxBytes),
"Failed to upload {{.file}} - the maximum allowed file size is {{.maxSize}} bytes.",
).SetParams(map[string]any{
"file": v.OriginalName,
"maxSize": maxBytes,