1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-11-25 07:34:10 +02:00

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"
validation "github.com/go-ozzo/ozzo-validation/v4"
"github.com/pocketbase/pocketbase/core/validators"
@@ -137,7 +136,7 @@ func (f *EditorField) ValidateValue(ctx context.Context, app App, record *Record
if int64(len(val)) > maxSize {
return validation.NewError(
"validation_content_size_limit",
fmt.Sprintf("The maximum allowed content size is %v bytes", maxSize),
"The maximum allowed content size is {{.maxSize}} bytes",
).SetParams(map[string]any{"maxSize": maxSize})
}