Goal
Add a Locale constraint — validate a string as a correct locale in Symfony's sense (Assert\Locale), typically BCP 47 with a region.
Reference
- Symfony:
Symfony\Component\Validator\Constraints\Locale.
Constraints
- No new dependencies in go.mod — use
golang.org/x/text/language (already present): parse and validate the tag, optional allowlist as in the reference.
Scope
- Document semantic differences from the Language constraint (see related Language issue) in the API description; tests.
Complexity
2 / 5.
Migrated from Linear: IGO-41
Priority: High
Estimate: 2 points
Goal
Add a Locale constraint — validate a string as a correct locale in Symfony's sense (
Assert\Locale), typically BCP 47 with a region.Reference
Symfony\Component\Validator\Constraints\Locale.Constraints
golang.org/x/text/language(already present): parse and validate the tag, optional allowlist as in the reference.Scope
Complexity
2 / 5.
Migrated from Linear: IGO-41
Priority: High
Estimate: 2 points