Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Nip Validator Bundle Laravel Package

kreyu/nip-validator-bundle

A Symfony bundle that adds validation for Polish NIP tax identification numbers. It integrates with Symfony’s Validator component, providing a constraint and validator to verify NIP format and checksum in forms and entities.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Poland market entry / B2B onboarding. Validating NIP (Polish tax ID) at the point of customer or supplier registration prevents bad tax data entering billing, CRM, and ERP before it becomes an invoicing problem.
  • Invoice gating and VAT treatment. A checksum-valid NIP is a precondition for reverse-charge / 0% VAT invoicing to Polish business customers. Catching malformed IDs at checkout avoids failed e-invoicing runs and manual credit notes.
  • Build vs. buy for a narrow, deterministic rule. NIP validation is a fixed checksum algorithm (weights + modulo 11). The "buy" option here is really "buy the Symfony glue" — a validator constraint plus DI registration. That is a low-value build, so the decision hinges on maintenance risk, not effort.
  • Data hygiene and deduplication. Normalizing and rejecting invalid tax IDs improves matching across CRM, billing, and support tooling, and reduces duplicate company records.
  • Scope discipline. Note what this does not buy you: it validates format/checksum only. It does not confirm the entity exists, is an active VAT payer, or matches a name/address. Those require registry lookups (Polish Biała lista / VIES) — a separate integration and a separate roadmap item. Stakeholders will conflate the two; correct them early.

When to Consider This Package

Adopt when all of the following hold:

  • Your application is Symfony >= 6.1 and already uses the Symfony Validator component. The package is a Symfony bundle — its service definitions and DI extension are Symfony-specific and will not load in Laravel.
  • You need only NIP/TIN checksum validation, not registry verification or EU-wide VAT ID validation.
  • You want a zero-configuration constraint for a small surface area, and you are comfortable with a dependency you will likely never upgrade-fork.

As of v2.1.0, the constraint can be applied as a native PHP attribute, which removes the last bit of boilerplate (annotations/YAML wiring) from the DTO/entity path. That is an ergonomics improvement only — it does not change what the package validates, what framework it runs on, or the ownership risk.

Look elsewhere or build in-house when:

  • You are on Laravel. Despite the "Laravel/PHP package" framing, this is not a Laravel package. Laravel has no bundle system; you would get no autoloaded service provider, no config, no facade. Write a Rule object around a plain-PHP NIP validator — roughly an hour of work — or use a framework-agnostic validator library. Do not adopt this bundle for a Laravel codebase.
  • You need more than NIP. REGON, PESEL, IBAN, EU VAT IDs, or name-matching against a registry are out of scope.
  • Maintenance risk is unacceptable. Stars: 4, dependents: 0, single-maintainer project, MIT. v2.1.0 is a sign of life, but it is a small feature release, not evidence of a support commitment — re-check the date and Symfony 7/8 compatibility before pinning. For a single deterministic checksum, the safe move is often to vendor the constraint into your own codebase: the logic is small enough to own outright and it eliminates the bus-factor question.
  • You need compliance-grade verification. Checksum validation is a UX filter, not a KYC control. If your obligations require confirming VAT status, budget for a registry API instead.

How to Pitch It (Stakeholders)

To executives: This is a small, free (MIT), low-risk utility that stops invalid Polish tax IDs from entering our billing and CRM systems. It reduces manual invoice corrections and support tickets as we serve Polish business customers. A recent release added support for PHP attributes, which is a developer-ergonomics win, not a change in what the tool does. It remains a hygiene fix, not a strategic capability — it validates the shape of a tax ID, not whether the company is real or VAT-registered. Budget separately if the business needs that.

To engineering: One Composer dependency, one attribute on a DTO, no infrastructure — and v2.1.0 makes the attribute form a first-class supported usage. Two caveats stand: (1) it is a Symfony bundle, so it is only relevant if we run Symfony 6.1+ — for Laravel this is a non-starter and we implement a custom rule instead; (2) it is still a single-maintainer project with 4 stars and no dependents, so pin the version and be prepared to fork or inline the constraint. Given the algorithm is a few dozen lines, inlining it remains a defensible alternative that removes the dependency entirely.

Recommendation: Adopt as a stopgap for a Symfony 6.1+ service with immediate Polish B2B needs; the attribute support in v2.1.0 makes integration slightly cleaner, but verify Symfony 7/8 compatibility before committing. For any Laravel service, or where we need VAT-payer verification, do not adopt — build a small in-house rule and plan a registry integration as a distinct initiative.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin