Polish combat scene validation

This commit is contained in:
2026-08-28 02:26:14 +00:00
parent 3ad34956c5
commit a2610757cd
6 changed files with 63 additions and 818 deletions

View File

@@ -196,13 +196,10 @@ func validateExplanation(value string) (string, error) {
if trimmed == "" {
return "", validatorErrorf("validator explanation must not be blank")
}
if trimmed != value {
return "", validatorErrorf("validator explanation must be trimmed")
}
if utf8.RuneCountInString(value) > maximumExplanationRunes {
if utf8.RuneCountInString(trimmed) > maximumExplanationRunes {
return "", validatorErrorf("validator explanation exceeds %d Unicode code points", maximumExplanationRunes)
}
return value, nil
return trimmed, nil
}
func Spec() pipeline.ValidatorSpec {