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

go-playground / validator
73%
v8: 100%

Build:
Build:
LAST BUILD BRANCH: master
DEFAULT BRANCH: v8
Repo Added 04 Jul 2015 04:42PM UTC
Files 36
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: SELECT
CHANGE BRANCH
x
  • No branch selected
  • #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.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/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
  • 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-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-consequtive-ors
  • fix-cron-validation
  • 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/1481-skip-invalid-type-validations
  • fix/add-missing-alpha-translations-1480
  • fix/alias-with-or-operator-766
  • fix/cyclic-alias-expansion
  • fix/remove-issue-template-md
  • fix/should-panic-required-if-duplicate-fieldname
  • fix/unique-unhashable-values
  • fix/update-mimetype
  • fix/validatemap-cross-field-panic-893
  • 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
  • master
  • minor-perf-1
  • minor-perf-2
  • msgv-changes
  • omitzero-slice-map-bug
  • paxman23l/fail-fast-feature
  • port-validator-doc
  • 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
  • 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

21 Oct 2026 09:09PM UTC coverage: 72.569%. Remained the same
39676452335

push

github

web-flow
Add postcode patterns for IE (Ireland), AL (Albania), GI (Gibraltar) and IL (Israel) (#1629)

postCodePatternDict had no entry for IE, AL or GI, so
postcode_iso3166_alpha2 / postcode_iso3166_alpha2_field rejected valid
postcodes for those countries (the built-in fails closed on unknown
countries). Adds the three patterns plus test coverage in both postcode
test tables. Also extends the existing IL (Israel) pattern to accept the
legacy 5-digit format alongside the 7-digit mikud.

- IE: `^[A-Z]\d[A-Z0-9][ ]?[A-Z0-9]{4}$` (Eircode)
- AL: `^\d{4}$`
- GI: `^GI\d{1,2}[ ]?\d[A-Z]{2}$` (UK format)
- IL: `^\d{5}(\d{2})?$` (was `^\d{7}$` only; now accepts the 7-digit
mikud as well as the legacy 5-digit — 6-digit remains invalid)

### Note on IL (re: #1644)
Upstream #1644 changed IL to `^\d{7}$` only, dropping the 5-digit
format. This PR intentionally keeps `^\d{5}(\d{2})?$`. Per Israel Post
(see [Wikipedia](https://en.wikipedia.org/wiki/Postal_codes_in_Israel)),
the 7-digit mikud became the official format on 2013-02-01 and the
5-digit codes were only valid until 31 Jan 2013 — but they "continue to
be widely used" in practice today. Accepting both avoids rejecting
still-in-use 5-digit addresses; 6-digit remains invalid. Happy to switch
to 7-only to match #1644 if maintainers prefer.

- [x] Tests exist or have been written that cover this particular
change.

@go-playground/validator-maintainers

---------

Co-authored-by: Johannes Hepp <johannes.hepp@digits.schwarz>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

15013 of 20688 relevant lines covered (72.57%)

89.18 hits per line

Relevant lines Covered
Build:
Build:
20688 RELEVANT LINES 15013 COVERED LINES
89.18 HITS PER LINE
Source Files on v8
  • Tree
  • List 36
  • 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
39676452335 master Add postcode patterns for IE (Ireland), AL (Albania), GI (Gibraltar) and IL (Israel) (#1629) postCodePatternDict had no entry for IE, AL or GI, so postcode_iso3166_alpha2 / postcode_iso3166_alpha2_field rejected valid postcodes for those countrie... push 21 Oct 2026 09:10PM UTC web-flow github
72.57
39660956166 feat/ie-al-gi-postcodes Simplify IL postcode pattern to ^\d{5}(\d{2})?$ Equivalent to ^\d{5}$|^\d{7}$, matching the optional-group style used elsewhere in postCodePatternDict (e.g. TW, US). Suggested in review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Pull #1629 21 Oct 2026 07:22PM UTC JohannesHepp github
72.57
39617497226 fix/unique-unhashable-values fix: validate uniqueness of non-comparable values Co-Authored-By: OpenAI Codex GPT-6 <noreply@openai.com> Pull #1676 21 Oct 2026 02:31PM UTC Harshil-1603 github
72.59
39615413780 fix/cyclic-alias-expansion fix: detect cyclic validation aliases Co-Authored-By: OpenAI Codex GPT-6 <noreply@openai.com> Pull #1675 21 Oct 2026 02:17PM UTC Harshil-1603 github
72.58
39286091229 master Clarify separators for non-existent directory paths (#1672) Closes #1212. Clarify that non-existent directory paths require a trailing `os.PathSeparator`. Add a portable, runnable example showing the difference between `dir` and `dirpath`. The ... push 19 Oct 2026 04:31PM UTC web-flow github
72.57
39083526936 docs/dirpath-trailing-separator docs: move directory path example under _examples Co-Authored-By: gpt-6.1-sol <noreply@openai.com> Signed-off-by: Yusuf Efe <120668197+yuefdev@users.noreply.github.com> Pull #1672 18 Oct 2026 12:39AM UTC yuefdev github
72.57
39076861979 docs/dirpath-trailing-separator docs: check directory example cleanup errors Co-Authored-By: gpt-6.1-sol <noreply@openai.com> Signed-off-by: Yusuf Efe <120668197+yuefdev@users.noreply.github.com> Pull #1672 17 Oct 2026 10:53PM UTC yuefdev github
72.58
39075177284 docs/dirpath-trailing-separator docs: clarify directory path separators Co-Authored-By: gpt-6.1-sol <noreply@openai.com> Signed-off-by: Yusuf Efe <120668197+yuefdev@users.noreply.github.com> Pull #1672 17 Oct 2026 10:28PM UTC yuefdev github
72.58
38710515314 feat/ie-al-gi-postcodes Merge remote-tracking branch 'upstream/master' into feat/ie-al-gi-postcodes Pull #1629 15 Oct 2026 09:07AM UTC Johannes Hepp github
72.57
38625628154 master ci: send coverage from the Go 1.26.x leg (step skipped since #1535) (#1671) ## Fixes Or Enhances `Send Coverage` in `.github/workflows/workflow.yml` only runs when `matrix.go-version == '1.24.x'`, and #1535 (Go 1.26 support) took 1.24.x out of t... push 14 Oct 2026 07:41PM UTC web-flow github
72.57
See All Builds (1525)
  • 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