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.mod —
golang.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
Goal
Add a Language constraint — validate a string as a correct BCP 47 language tag / application-allowed subset (like
Assert\Languagein Symfony).Reference
Symfony\Component\Validator\Constraints\Language.Constraints
golang.org/x/text/languageis allowed (already a project dependency): uselanguage.Parseand optionally compare against an allowlist.Scope
Complexity
2 / 5.
Migrated from Linear: IGO-40
Priority: High
Estimate: 2 points