wilsenhc/laravel-rif-validation
Laravel validation rule for Venezuelan RIF (Registro de Información Fiscal) numbers. Adds a reusable rule to verify RIF format and check digit, so tax IDs are validated cleanly in form requests and validators without custom logic.
Package: wilsenhc/laravel-rif-validation — a Laravel validation-rule wrapper around the standalone rif-validation library for Venezuelan RIF (Registro de Información Fiscal) tax identifiers. Scope is intentionally narrow: one domain rule, registered via a service provider, consumed inside FormRequest/Validator chains.
Architecture fit. Small, single-responsibility utility. It sits in the same layer as Laravel's first-party rules (Vat, Regex, etc.) and carries no persistence, queueing, or HTTP surface. It is safe to consume from any layer that already depends on the validator (requests, form objects, Filament/Nova field definitions, API resources via manual Validator::make). No architectural objection to adoption in a Laravel codebase that validates Venezuelan customer/supplier tax IDs (billing, invoicing, fiscal onboarding, ERP integrations).
Integration feasibility. High. Standard Composer install plus auto-discovered service provider; a rule string usable in existing $rules arrays. The only meaningful integration decision is whether validation happens at the request boundary, the domain layer, or both.
Technical risk. Low overall, with one notable caveat created and then resolved by v2.0.0 → v2.0.1:
rif-validation to a non-stable build. That is a reproducibility and supply-chain concern: builds could resolve to unreleased code that changes without a version bump on this package, and CI could go red on an unrelated day.rif-validation release. This materially improves determinism and is the main reason to prefer v2.0.1 over v2.0.0 — it is a fix with real operational value despite being a one-line changelog.J/V/E/P/G, hyphenation and zero-padding tolerance) that are easy to get subtly wrong; (c) v2.0.0 was a major bump, so anything still on v1.x needs a review before moving.Key questions.
J-12345678-9 vs J123456789) or does it require normalization upstream? Determines whether we need a mutator before validation.Store and Update paths where the RIF is unique-checked, and does it compose with unique/exists rules in one chain?Stack fit. Composer package with Laravel auto-discovery; fits Laravel 10+/11+ style rule objects. No database, no config publish required, no asset build. Works unchanged in a containerized CI pipeline.
Migration path.
composer require wilsenhc/laravel-rif-validation:^2.0.1 — start at the patched version, never adopt 2.0.0.rif-validation library. Worth considering only if we need to normalize/format RIF before validating or want to avoid a thin wrapper in the dependency tree.Compatibility. Verify the supported PHP version against our runtime before merging; the major bump likely raised the minimum PHP minor. Because the validation semantics live in rif-validation, our behavior is coupled to that library's release cadence — pin it with a committed composer.lock and let Renovate/Dependabot surface updates rather than floating constraints.
Sequencing.
composer validate, clean composer install from lock).Maintenance. Very low. The package is a thin adapter; most of our maintenance attention belongs to rif-validation, which is the actual source of truth and a single-maintainer project. Upgrades are Composer bumps with no data migration. The real maintenance obligation we take on is our own fixture test suite — cheap to write, and it converts future silent behavior changes into failing tests.
Support. No vendor support; community/GitHub issues only. Mitigation is straightforward: we can fork or, worst case, replace the rule with a local implementation in an afternoon. There is no deep coupling, so the support risk is bounded and recoverable.
Scaling. Not a scaling concern in the conventional sense — it is a CPU-cheap string/check-digit validation run per request, well under any meaningful threshold. At high write volume on fiscal endpoints, the cost is dominated by database uniqueness checks, not by this rule. No caching or queuing design is required.
Failure modes.
lang override if the surface is user-facing in other locales.Ramp-up. Negligible for any Laravel developer — the usage is a string in a rules array. The knowledge worth writing down is not "how to use the rule" but "which entities require a RIF, where normalization happens, and what the manual override procedure is." Half a day of onboarding documentation covers it.
Recommendation. Adopt ^2.0.1 for Venezuelan fiscal-identifier validation. It is a low-risk, low-maintenance dependency whose v2.0.1 patch corrects a genuine reproducibility defect in v2.0.0. Approve adoption conditional on (a) confirming the v2.0.0 upgrade notes against our runtime, and (b) landing a small fixture-based test suite so the underlying validator's behavior is pinned by us, not only by the vendor.
How can I help you explore Laravel packages today?