webman/validation
Laravel-style validation for the webman framework. Validate request data with expressive rule strings, custom messages, and scene-based rulesets, then reuse the same validator across controllers and services. Lightweight, framework-friendly, and easy to integrate into existing webman applications.
if (empty($post['email'])) checks scattered across controllers. This package answers the "do we write our own validation layer?" question with a cheap "no" — one Composer dependency instead of an internal mini-framework we'd own forever.Validator interface so we can swap it later — a small architectural bet we should make explicitly rather than by accident.Adopt when:
#[Validate]-style) so controllers stay thin and rules live next to the handler.webman-php organization — i.e., the same maintainers as the core framework — over raw community metrics.Look elsewhere when:
illuminate/validation standalone, symfony/validator, or respect/validation.justinrainbow/json-schema, league/openapi-psr7-validator) so the spec is the source of truth.Adoption guardrails I'd insist on: pin the exact version in composer.json, wrap it behind an internal interface, and add a contract test suite so a swap is a day's work, not a quarter's.
To executives: "We can harden every endpoint against malformed input for roughly one dependency and a day of integration work, instead of a multi-sprint internal project. It's published by the Webman core team, so it's aligned with the framework we're already betting on. The tradeoff is that it's a young, low-adoption package — so we're capping the risk by wrapping it behind our own interface and pinning the version. Worst case, swapping it out is a contained engineering task."
To engineering: "Attribute-driven validation for Webman — declarative rules on the controller, scene support for create/update/admin variants, Laravel-ish rule syntax so onboarding is trivial. It removes the boilerplate and the 'where does validation live?' argument. Caveats: 1 star, 0 dependents, no community backstop — treat it as a small, replaceable dependency, not infrastructure. We'll put it behind a Validator interface, pin the version, and cover it with contract tests."
To security/QA: "This gives us a consistent, enumerable list of what every endpoint accepts and rejects, which is a meaningful improvement over ad-hoc empty() checks and makes input-validation review a matter of reading attributes rather than tracing control flow."
Bottom line for the decision meeting: Low cost, moderate payoff, contained risk — worth a one-week spike on a single service; not worth standardizing across the org until it has survived a quarter in production with us.
How can I help you explore Laravel packages today?