Skip to content

Constraint: Language (BCP 47) #112

Description

@cursor

Goal

Add a Language constraint — validate a string as a correct BCP 47 language tag / application-allowed subset (like Assert\Language in Symfony).

Reference

  • Symfony: Symfony\Component\Validator\Constraints\Language.

Constraints

  • No new dependencies in go.modgolang.org/x/text/language is allowed (already a project dependency): use language.Parse and optionally compare against an allowlist.

Scope

  • Error messages, tests: valid tags, garbage input, optional list of allowed languages (if present in Symfony).

Complexity

2 / 5.


Migrated from Linear: IGO-40
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