Skip to content

Conversation

@bfabio
Copy link
Contributor

@bfabio bfabio commented Nov 8, 2025

Add strict BCP47 language tag validator enforcing RFC5646 and rejecting Unicode extensions unlike language.Parse().

Fixes Or Enhances

Fix #1221.

Make sure that you've checked the boxes below before you submit PR:

  • Tests exist or have been written that cover this particular change.

@go-playground/validator-maintainers

Add strict BCP47 language tag validator enforcing RFC5646 and
rejecting Unicode extensions unlike language.Parse().

Fix go-playground#1221.
@bfabio bfabio requested a review from a team as a code owner November 8, 2025 11:02
@coveralls
Copy link

Coverage Status

coverage: 73.815% (+0.09%) from 73.73%
when pulling ba8f1be on bfabio:bcp47_strict_language_tag
into 6a38036 on go-playground:master.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bcp47_language_tag doesn't fail on some non-BCP47 tags

2 participants