Skip to content

Constraint: Charset (UTF-8 validity) #114

Description

@cursor

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions