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

View File

@@ -2,7 +2,6 @@ package core
import (
"context"
"fmt"
"slices"
"strconv"
"strings"
@@ -160,7 +159,7 @@ func (f *JSONField) ValidateValue(ctx context.Context, app App, record *Record)
if int64(len(raw)) > maxSize {
return validation.NewError(
"validation_json_size_limit",
fmt.Sprintf("The maximum allowed JSON size is %v bytes", maxSize),
"The maximum allowed JSON size is {{.maxSize}} bytes",
).SetParams(map[string]any{"maxSize": maxSize})
}