• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

go-playground / validator
73%
v8: 100%

Build:
Build:
LAST BUILD BRANCH: fix/self-referential-extraction-loop
DEFAULT BRANCH: v8
Repo Added 04 Jul 2015 04:42PM UTC
Files 37
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH master
branch: master
CHANGE BRANCH
x
Reset
  • master
  • #1519/feature/trx_addr-tag
  • FIX_FILEPATH_TAG
  • add-dependabot
  • add-fl-field-name
  • add-isdefault
  • add-support-to-tag-valid
  • add-unique
  • add_alpha_space_validator
  • bcp47_strict_language_tag
  • bic-iso-9362-2022
  • bump_x_net
  • bux-unix-addr-is-useless
  • cherry-pick-v9
  • ci/send-coverage-go-1.27
  • correct-var-lock
  • dependabot/github_actions/actions/checkout-5
  • dependabot/github_actions/actions/checkout-6
  • dependabot/github_actions/actions/setup-go-6
  • dependabot/github_actions/golangci/golangci-lint-action-6
  • dependabot/github_actions/golangci/golangci-lint-action-7
  • dependabot/github_actions/golangci/golangci-lint-action-8
  • dependabot/github_actions/golangci/golangci-lint-action-9
  • dependabot/go_modules/_examples/validate_fn/golang.org/x/crypto-0.35.0
  • dependabot/go_modules/_examples/validate_fn/golang.org/x/crypto-0.45.0
  • dependabot/go_modules/_examples/validate_fn/golang.org/x/net-0.38.0
  • dependabot/go_modules/github.com/gabriel-vasile/mimetype-1.4.10
  • dependabot/go_modules/github.com/gabriel-vasile/mimetype-1.4.11
  • dependabot/go_modules/github.com/gabriel-vasile/mimetype-1.4.12
  • dependabot/go_modules/github.com/gabriel-vasile/mimetype-1.4.13
  • dependabot/go_modules/github.com/gabriel-vasile/mimetype-1.4.16
  • dependabot/go_modules/github.com/gabriel-vasile/mimetype-1.4.9
  • dependabot/go_modules/golang.org/x/crypto-0.33.0
  • dependabot/go_modules/golang.org/x/crypto-0.38.0
  • dependabot/go_modules/golang.org/x/crypto-0.39.0
  • dependabot/go_modules/golang.org/x/crypto-0.40.0
  • dependabot/go_modules/golang.org/x/crypto-0.41.0
  • dependabot/go_modules/golang.org/x/crypto-0.42.0
  • dependabot/go_modules/golang.org/x/crypto-0.43.0
  • dependabot/go_modules/golang.org/x/crypto-0.45.0
  • dependabot/go_modules/golang.org/x/crypto-0.46.0
  • dependabot/go_modules/golang.org/x/crypto-0.47.0
  • dependabot/go_modules/golang.org/x/crypto-0.48.0
  • dependabot/go_modules/golang.org/x/crypto-0.59.0
  • dependabot/go_modules/golang.org/x/net-0.38.0
  • dependabot/go_modules/golang.org/x/text-0.22.0
  • dependabot/go_modules/golang.org/x/text-0.25.0
  • dependabot/go_modules/golang.org/x/text-0.26.0
  • dependabot/go_modules/golang.org/x/text-0.27.0
  • dependabot/go_modules/golang.org/x/text-0.28.0
  • dependabot/go_modules/golang.org/x/text-0.29.0
  • dependabot/go_modules/golang.org/x/text-0.30.0
  • dependabot/go_modules/golang.org/x/text-0.31.0
  • dependabot/go_modules/golang.org/x/text-0.32.0
  • dependabot/go_modules/golang.org/x/text-0.33.0
  • dependabot/go_modules/golang.org/x/text-0.34.0
  • dependabot/go_modules/golang.org/x/text-0.44.0
  • doc/validation-error-filed
  • docs/dirpath-trailing-separator
  • docs/fix-typos
  • document-omitzero
  • duration-translation-en-fix
  • email-regexp-optimization
  • en_urn_rfc2141
  • enable-more-linters
  • example-simple-signup
  • exclude-modernize-linter
  • feat/add-hungarian-translations
  • feat/add-translation-de-alphanumspace-alphanumunicode
  • feat/ie-al-gi-postcodes
  • feat/improve-indonesian-translations-and-add-tests
  • feat/option-multi-error-returned
  • feat/urn-8141
  • feat/validation-valuer
  • feature/add-cmyk-to-validator
  • feature/add-early-return-error
  • feature/german-translations
  • feature/omitzero
  • field-level-validation2
  • fix-1500
  • fix-1502-update-ccy-codes
  • fix-1513-iso31662-codes
  • fix-32bit-test-failures
  • fix-bcp47-duplicate-variants
  • fix-consequtive-ors
  • fix-cron-validation
  • fix-cyclic-alias-panic
  • fix-duration
  • fix-e164-regexp
  • fix-examples-errors-as
  • fix-linter-errors-2.0.2
  • fix-map-validation-missing-keys
  • fix-required-without
  • fix-rfc-1035-label-length-check
  • fix-unique-map-nil-values
  • fix-unique-nil-panic
  • fix-unique-unhashable-1674
  • fix-unique-unhashable-elements
  • fix/1327-hostname-ip
  • fix/1481-skip-invalid-type-validations
  • fix/1698-self-referential-pointer
  • fix/add-missing-alpha-translations-1480
  • fix/alias-cycle-at-registration
  • fix/alias-with-or-operator-766
  • fix/btc-bech32m-taproot
  • fix/chinese-unique-translations
  • fix/cross-field-struct-comparison
  • fix/cyclic-alias-expansion
  • fix/doc-stale-tags
  • fix/duration-translations
  • fix/mimetype-detected-charset
  • fix/numeric-tag-parameters-decimal
  • fix/postcode-anchor-alternation
  • fix/quoted-param-apostrophes
  • fix/remove-issue-template-md
  • fix/self-referential-extraction-loop
  • fix/should-panic-required-if-duplicate-fieldname
  • fix/ssn-never-assigned-areas
  • fix/ulid-128-bit-range-20261003
  • fix/unique-unhashable-elements
  • fix/unique-unhashable-values
  • fix/update-mimetype
  • fix/uuid-rfc4122-variant-field
  • fix/validatemap-cross-field-panic-893
  • fix/zh-unique-translation
  • fix_fqdn
  • fixes
  • general-maint
  • general-maint2
  • github-action-support-2-major-go-versions
  • github-actions
  • github-workflow-msgv
  • go-1.25
  • go-context-support
  • heads/v5
  • heads/v7
  • heads/v8
  • https_url
  • i18n-custom-errors
  • issue-1306-excluded_unless-expectation-parity-with-required_unless
  • issue-743
  • jmfrees/fix-required_without
  • krhubert
  • map-struct-validation-bug
  • minor-perf-1
  • minor-perf-2
  • msgv-changes
  • omitzero-slice-map-bug
  • patch-1
  • paxman23l/fail-fast-feature
  • port-validator-doc
  • pr/hostname-total-length
  • readme-fix-release-version-badge
  • replace-travis-ci-badge-with-gha
  • require-check-field-kind-unparam
  • revert-e164-min-limit
  • rm-gitter-im-link
  • s-existant-existent
  • stricter-unicode-space-check-in-email-regex
  • supplyChainHardening
  • test/improve-baked-in-field-level-coverage
  • tr-complete-translations
  • translate-thai
  • translation
  • unicode-alphas
  • unit-tests-startsnotwith
  • unnecessary-statement
  • upd-readme-prj-status-release-label
  • update-deps-dec-2024
  • update-docs
  • updates-and-fixes
  • url_file
  • urls
  • v10.0.0
  • v10.0.1
  • v10.1.0
  • v10.2.0
  • v10.3.0
  • v10.4.0
  • v10.4.1
  • v5
  • v5-development
  • v5.10.1
  • v5.10.2
  • v6
  • v6-development
  • v7
  • v7-development
  • v8
  • v8-backport-test-fixes
  • v8-development
  • v9
  • v9.30.1
  • validate-keys
  • validate-map-keys
  • validator-panic-bug

24 Nov 2026 10:23PM UTC coverage: 72.668% (+0.02%) from 72.649%
45500535864

push

github

web-flow
fix: support BIP-350 Bech32m checksums and padding in btc_addr_bech32 (#1697)

## Fixes Or Enhances

Updates `isBitcoinBech32Address` (`btc_addr_bech32`) to comply with
BIP-350 (Bech32m) and BIP-173 padding rules:

- Use the BIP-173 Bech32 checksum constant (`1`) for witness version 0
and the BIP-350 Bech32m checksum constant (`0x2bc830a3`) for witness
versions 1–16 (including SegWit v1 Taproot `bc1p...` addresses).
- Validate 5-to-8-bit conversion padding per BIP-173 / BIP-350
(`convertbits` with `pad=false`) by rejecting non-zero padding bits, and
mask the bit accumulator to avoid overflow.
- Replace the unused `[]int` witness-program slice accumulation with a
byte counter to avoid an unnecessary allocation.
- Update the pre-BIP-350 witness v1/v2/v16 test vectors in
`TestBitcoinBech32AddressValidation` and add official BIP-350
valid/invalid Taproot vectors plus non-zero padding tests.
- Update `README.md` and `doc.go` to reflect Bech32m / Taproot support.

> **AI Disclosure**: This pull request was AI-assisted (implemented with
Gemini).

**Make sure that you've checked the boxes below before you submit PR:**
- [x] Tests exist or have been written that cover this particular
change.

@go-playground/validator-maintainers

Co-authored-by: Gemini <noreply@google.com>

21 of 21 new or added lines in 1 file covered. (100.0%)

15673 of 21568 relevant lines covered (72.67%)

90.46 hits per line

Relevant lines Covered
Build:
Build:
21568 RELEVANT LINES 15673 COVERED LINES
90.46 HITS PER LINE
Source Files on master
  • Tree
  • List 37
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
45500535864 master fix: support BIP-350 Bech32m checksums and padding in btc_addr_bech32 (#1697) ## Fixes Or Enhances Updates `isBitcoinBech32Address` (`btc_addr_bech32`) to comply with BIP-350 (Bech32m) and BIP-173 padding rules: - Use the BIP-173 Bech32 checksu... push 24 Nov 2026 10:24PM UTC web-flow github
72.67
44644256455 master fix: reject non-digit characters in cve validator sequence number (#1611) The `cve` validator's regex uses `[^0]` (any character except `0`) in the three leading-zero sequence-number branches, where a non-zero **digit** `[1-9]` was intended — eve... push 20 Nov 2026 12:15AM UTC web-flow github
72.65
44392760303 master test: improve unit test coverage (#1693) - Add tests for startsnotwith/endsnotwith (previously untested) - Cover RegisterStructValidationMapRules (previously untested) - Cover FieldLevel.GetStructFieldOK2 and GetStructFieldOKAdvanced - Cover omit... push 18 Nov 2026 08:36PM UTC web-flow github
72.65
44195683921 master Feat/add hungarian translations (#1690) ## Fixes Or Enhances Adds Hungarian (`hu`) translations for the validation error messages. The new `translations/hu` package has the same structure as the English one and covers every tag that `en` does. ... push 17 Nov 2026 11:02PM UTC web-flow github
72.46
43906062438 master chore(deps): bump golang.org/x/crypto from 0.58.0 to 0.59.0 (#1691) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.58.0 to 0.59.0. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/golang/crypto/commi... push 16 Nov 2026 04:19PM UTC web-flow github
72.58
40968705535 master Add uuid7 validation tag (#1614) ## What type of PR is this? - feature ## What this PR does / why we need it: Adds a built-in `uuid7` validation tag for version 7 UUIDs (RFC 9562). The library already validates UUID versions 3, 4 and 5, but t... push 29 Oct 2026 10:49PM UTC web-flow github
72.58
40968509375 master Convert to time.Time before asserting in isNeField (#1619) `nefield` panics on a named type whose underlying type is `time.Time`. ```go type MyTime time.Time type Test struct { Start MyTime End MyTime `validate:"nefield=Start"` } validate.S... push 29 Oct 2026 10:47PM UTC web-flow github
72.58
40776322458 master fix: reject duplicate variants in strict BCP47 tags (#1678) ## Fixes Or Enhances Fixes #1677. The strict BCP47 validator checks that each variant is registered but did not check whether the same variant already occurred in the tag. RFC5646 secti... push 28 Oct 2026 09:59PM UTC web-flow github
72.58
40600899027 master fix: reject ULIDs outside the 128-bit range (#1660) ## Reject out-of-range ULID strings The `ulid` tag currently accepts 26-character Base32 strings starting with `8` or a letter, although the [ULID specification](https://github.com/ulid/spec#ov... push 27 Oct 2026 11:16PM UTC web-flow github
72.57
40376692636 master fix: anchor GB and LI postcode patterns as a whole (#1646) ## Fixes Or Enhances Fixes a false accept in `postcode_iso3166_alpha2` for GB and LI. Both patterns in `postcode_regexes.go` contain a top level `|` sitting between `^` and `$`, and in R... push 26 Oct 2026 06:20PM UTC web-flow github
72.57
See All Builds (1577)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc