Review fixes

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-04-01 19:44:23 +04:00
parent e5b155a584
commit 821f66cc20
15 changed files with 255 additions and 39 deletions

View File

@@ -25,7 +25,11 @@ import (
// strings are allowed.
func ProseMirrorDocumentContent() ValidatorFunc {
return func(value any) *ValidationError {
s, ok := value.(string)
actualValue, isNil := dereferenceValue(value)
if isNil {
return nil
}
s, ok := actualValue.(string)
if !ok {
return newValidationError(ErrorCodeInvalidFormat, "value must be a string")
}