Goal
Add a constraint inspired by Symfony Charset — verify that a string is correctly encoded in a given character encoding.
Reference
- Symfony:
Symfony\Component\Validator\Constraints\Charset (via iconv).
Constraints
- No new dependencies — reasonable first iteration scope: UTF-8 via
utf8.ValidString / runes; other encodings only if they can be checked with stdlib without heavy tables.
Scope
- Clearly document limitations relative to Symfony in godoc; tests for invalid UTF-8.
Complexity
2 / 5.
Migrated from Linear: IGO-42
Priority: High
Estimate: 2 points
Goal
Add a constraint inspired by Symfony Charset — verify that a string is correctly encoded in a given character encoding.
Reference
Symfony\Component\Validator\Constraints\Charset(viaiconv).Constraints
utf8.ValidString/ runes; other encodings only if they can be checked with stdlib without heavy tables.Scope
Complexity
2 / 5.
Migrated from Linear: IGO-42
Priority: High
Estimate: 2 points