alt-three/validator
Alt Three Validator is a lightweight Laravel package that extends the built-in validator with a hash rule. Use it to verify that an input matches a stored hash, such as checking a password against a hashed value, with simple rule syntax in your validation rules.
Architecture fit. alt-three/validator is a deliberately thin abstraction: a single abstract Validator class wrapping Illuminate\Contracts\Validation\Factory, exposing a validate() entry point that throws a package-specific ValidationException carrying a MessageBag. It is constructor-injected via the Laravel container, so it slots into existing service-provider wiring with no bootstrapping, config, facade, or middleware. For teams already using the "validator-as-service-object" pattern (validate in a dedicated class rather than a FormRequest), the architectural fit is high; for teams standardized on Laravel's native FormRequest / $request->validate() idioms, it adds an abstraction layer without removing any code.
Integration feasibility. Low-to-moderate. Composer is the gating concern, not design. The package's illuminate/* constraints are pinned to the Laravel 5.x/6.x era (last release 2020-07-25), so installation against Laravel 9/10/11 will almost certainly fail dependency resolution and require either --ignore-platform-reqs-style workarounds (not recommended) or a maintained fork with widened constraints. Because the surface area is small — one abstract class plus one exception — a fork is genuinely cheap; this is one of the few abandoned packages where "vendor it and own it" is a credible option rather than a liability transfer.
Technical risk. High, concentrated in abandonment rather than complexity:
ValidationException behavior, message-bag handling). A fork may compile yet behave subtly differently from native validation, producing discrepancies that only appear in edge cases.ValidationException, not Laravel's, so global exception handlers, API error formatters, and Inertia/Livewire adapters that key off Illuminate\Validation\ValidationException will silently miss it. This is the highest-probability runtime surprise.Key questions.
Illuminate\Validation\ValidationException type? If so, what is the mapping cost?FormRequest and inline validate()?Factory directly.Stack fit. Best fit is a Laravel 5.5–6.x monolith or service already using Alt Three's ecosystem conventions, where the package is a stylistic match. Poor fit for Laravel 9+ greenfield work: there is no version of this package that is contemporaneous with the framework, so every install is a modernization project.
Migration path. Three viable routes, in descending order of preference:
ValidationException extending or aliasing Laravel's) takes well under a day and yields code you fully control, with correct types and no fork obligation. This captures the design intent at near-zero carrying cost.VCS or path Composer entry, widen illuminate/* and PHP constraints, and run the test suite against target framework versions. Estimated 3–5 engineer-days including regression coverage of exception behavior.Compatibility. Confirm three things before any code lands: PHP version support (the 2020 cut-off predates general PHP 8 adoption), illuminate/validation and illuminate/support constraint ranges against the target framework, and the exact signature of Illuminate\Contracts\Validation\Factory in that framework — a mismatch here surfaces as a fatal at container resolution, not at install time. Treat a passing composer require as necessary but not sufficient; add an integration test that exercises validate() on both a passing and failing payload.
Sequencing. (1) Decision gate — adopt-as-is, fork, or replicate; default recommendation is replicate. (2) If forking: create fork, widen constraints, CI matrix across supported Laravel majors. (3) Add the exception-handling adapter and a regression test before migrating call sites. (4) Migrate call sites incrementally, one validator class per PR, so behavior diffs are attributable. (5) Retire the dependency if the replicate path was chosen.
Maintenance. Effectively total. Archived upstream means the fork (or the dependency, if un-forked) is yours alone: dependency bumps, PHP version compatibility, and Laravel major-upgrade prep all become internal work. Budget roughly 0.5 engineer-day per quarter for a fork plus 1–2 days per Laravel major release. This is small in absolute terms but is a permanent, non-amortizing tax on a package that removes perhaps 100 lines of boilerplate.
Support. None. No upstream issue triage, no CVE channel, no maintainer response. For a validation wrapper the security blast radius is limited — it does not parse untrusted input itself, it delegates to Laravel's validator — so the realistic exposure is correctness and upgrade friction rather than vulnerability. That distinction matters for risk acceptance: this is a maintainability liability, not a security emergency.
Scaling. Negligible on both axes. Runtime overhead is one extra object per validation call and one extra exception wrapper on failure — immaterial against the underlying validation work. Team scaling is the real constraint: a bespoke validation abstraction on top of Laravel's already-opinionated validation layer raises the number of "how do we validate here?" answers, which costs onboarding time and review attention on every new endpoint.
Failure modes.
Ramp-up. Trivial — an engineer familiar with Laravel reads the entire package in under 15 minutes, and the pattern is learnable in an hour. The inverse is the problem: because it is so easy to understand, it is easy to adopt casually without a decision record, leaving an undocumented deviation from framework idiom that outlives its rationale.
Recommendation. Do not adopt the artifact. Adopt the idea: implement the abstract-validator pattern internally, extending Laravel's native ValidationException so existing error handling continues to work, at a cost of roughly one engineer-day and zero ongoing dependency risk. Reserve the fork path for the narrow case of an application already committed to Laravel 6 with no upgrade horizon, and require explicit named ownership before that fork is merged.
How can I help you explore Laravel packages today?