datalogix/laravel-validation
A Laravel package that extends the built-in validator with reusable custom validation rules and helpers, helping you organize validation logic and apply consistent rules across forms and requests.
Architecture fit. datalogix/laravel-validation is a thin adapter between Laravel's Validator and the Respect\Validation rule set. It registers domain-specific rules — hetu (Finnish personal identity code), portuguese_nif (Portuguese tax ID), public_domain_suffix, between_exclusive, contains_count, mimetype, uploaded — as native-looking Laravel validation extensions. Architecturally it sits alongside, not inside, application code: no middleware, no service overrides, no persistence. That makes it a low-coupling dependency that a TPM can approve for a bounded use case (form/API input validation) without a platform-level commitment.
Integration feasibility. Composer-installable, Laravel service-provider auto-discovery, standard vendor:publish for translation stubs. v4.0.1 is a patch on top of v4.0.0 — the release notes describe only additive translation keys (en, pt_BR) for seven rules, removal of a dead attribute translation key, and documentation of placeholder semantics (:value, :values, :min, :max). Nothing in the release requires application code changes.
Technical risk. Low. The only "removal" is the attribute message, and the notes explicitly justify it: Laravel's internal validateAttribute() shadows the Respect rule, so the key was never read. That means zero behavioral delta for existing consumers, but it does mean any team that locally overrode attribute in this package's namespace is holding dead configuration — harmless, worth cleaning up. The more material fix is the localization gap: prior to 4.0.1, seven rules rendered raw keys such as validation.hetu directly into user-facing forms. That is a UX/compliance-visible defect (error text leaking internal keys) that is now closed for en and pt_BR.
Key questions. Which Laravel and PHP versions does the 4.x line support, and does v4.0.0 carry breaking changes relative to 3.x that need to be sequenced separately? Are en/pt_BR the only shipped locales, or are other locale files partially populated and therefore still at risk of raw-key leaks? Are the new translations loaded via loadTranslationsFrom, and will a vendor:publish overwrite or merge with existing published stubs? Does the package pin a Respect\Validation major version, and how tightly coupled is rule registration to its class names?
Stack fit. Best suited to Laravel applications with a concrete, standards-driven validation need: fintech or KYC flows validating Portuguese NIF, HR/identity onboarding validating Finnish HETU, marketplace or multi-tenant apps validating domain inputs via public suffix checks, and any file-upload path needing mimetype/uploaded semantics. If none of those rules are in scope, the package is unnecessary surface area — the TPM call should be "adopt per-rule, not per-default."
Migration path. From 4.0.0, treat as a drop-in patch: composer update, re-publish or merge translation stubs to pick up the new keys, delete any local attribute override, and confirm localized messages render. From 3.x, this must be planned as part of the 4.0 major upgrade — the patch notes do not describe the 3.x→4.x delta, so the major-version changelog must be reviewed before scoping.
Compatibility. Additive translation keys are backwards-compatible; the removed key is unreachable by design. The main compatibility surface is not this release but the underlying Respect\Validation version constraint and Laravel minor-version support.
Sequencing. (1) Confirm target Laravel/PHP versions against the 4.x support matrix. (2) Upgrade to 4.0.1 in a non-production branch and run the existing validation test suite. (3) Re-publish lang files and diff against the current published set to catch overrides. (4) Spot-check each adopted rule in the target locale to confirm no raw keys surface. (5) Roll to production behind the normal release train — no feature flag warranted for a patch of this shape.
Maintenance. Low burden: the package is a thin wrapper, and patch releases of this size (translations + docs) are cheap to consume. The real maintenance attention belongs to the Respect\Validation dependency underneath — rule renames or signature changes upstream are the most likely source of future breakage, and the wrapper will inherit them.
Support. This release should reduce support volume rather than add to it. Raw keys like validation.hetu reaching end users generate bug reports that look like application defects and are hard for first-line support to triage. Closing that gap for en and pt_BR removes a class of tickets. The placeholder documentation (:value, :values, :min, :max) also preempts a recurring developer question about why a custom message renders an empty substitution.
Scaling. Effectively zero runtime cost — these are in-process PHP validators with no I/O except uploaded/mimetype, which inspect the already-uploaded file. No caching, queueing, or external service dependency to capacity-plan.
Failure modes. (a) A locale is shipped in the product but not covered by this package's translation files, so raw keys reappear for those users — the v4.0.1 fix is locale-specific, not universal. (b) Published translation stubs drift from upstream and silently mask new keys. (c) A local attribute override remains in the codebase as dead config after this release. (d) Upstream Respect rule deprecations break registration at boot time, which surfaces as a hard failure rather than a validation miss.
Ramp-up. Minimal. A Laravel developer already familiar with custom validation rules needs under a day to adopt, and the primary learning is domain knowledge — which rule maps to which national or file-format standard — rather than framework knowledge. The main onboarding artifact worth writing internally is a short rule-to-business-requirement mapping so that future contributors do not swap a standards-specific rule for a generic regex.
How can I help you explore Laravel packages today?