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

Validator Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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:

  • Archived upstream, zero dependents, 20 stars. No security response path, no upstream fixes, no community triage. Any defect is yours.
  • Contract drift. Laravel's validation contracts and exception semantics have shifted since 2020 (typed signatures, ValidationException behavior, message-bag handling). A fork may compile yet behave subtly differently from native validation, producing discrepancies that only appear in edge cases.
  • Divergent exception type. The package throws its own 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.
  • Scoring signal. A composite score of 0.08 with an opportunity score of 17.93 is a weak-but-not-worthless profile: the pattern has residual value, the artifact does not.

Key questions.

  1. Does our Laravel version fall inside the package's supported constraint range, or are we committing to a fork on day one?
  2. Does our error-handling layer depend on the concrete Illuminate\Validation\ValidationException type? If so, what is the mapping cost?
  3. Is there an existing internal validation convention this would replace, or would it become a competing third pattern alongside FormRequest and inline validate()?
  4. Who owns the fork — named engineer, named team — and what is the review cadence against Laravel majors?
  5. Is the abstraction earning its keep? A ~100-line wrapper must justify itself against simply injecting Factory directly.

Integration Approach

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:

  1. Don't adopt — replicate the pattern. The class is small enough that writing an internal equivalent (abstract validator + 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.
  2. Fork and modernize. Add the repository under a 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.
  3. Adopt as-is. Only defensible if the application is pinned to Laravel 6 and has no near-term upgrade path — a shrinking population. Would require security-review sign-off on an archived dependency.

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.

Operational Impact

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.

  • Composer resolution failure on install or on any Laravel bump — loud, immediate, low cost.
  • Contract signature mismatch at container resolution — fatal at boot, caught in CI if the app boots in tests.
  • Exception-type mismatch — the dangerous one. Silent: validation failures propagate as unhandled 500s or bypass the standard 422 JSON shape instead of returning field-level errors. Mitigate with a dedicated exception-handler mapping and an end-to-end test asserting the error response body.
  • Behavioral drift after fork — validation rules and message formatting diverge subtly from native; surfaces as inconsistent error text across endpoints.
  • Bus factor — the fork's sole maintainer leaves; cost is re-deriving a 100-line class, which is recoverable, so this is a low-severity risk.

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.

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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums