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

Sanitizer Laravel Package

waavi/sanitizer

Waavi Sanitizer provides a simple, flexible way to clean and transform user input in Laravel before validation. Define reusable sanitizers with built-in filters like trim, escape, cast, and custom filters to keep your data safe and consistent.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature scoping: Decide whether input sanitation is a distinct product requirement or should remain part of validation. This package supports declarative sanitation inside Laravel form requests, so it is most relevant for features with many user-submitted forms, legacy input-cleaning logic, or inconsistent ad hoc filters.
  • Roadmap and modernization: Useful as a tactical bridge for existing Laravel 6/7 applications that need consistent form-request sanitation while a broader framework upgrade is planned. It should not become a strategic dependency for greenfield products without compatibility and maintenance review.
  • Build vs. buy/fork: For a legacy Laravel 7 codebase, adopting or forking this package may be cheaper than building a custom sanitization layer. For a small number of fields, a lightweight in-house sanitizer is likely simpler. For modern Laravel/PHP versions, prefer maintained alternatives or a small internal abstraction.
  • Use cases: Trim and normalize strings, strip tags from plain-text fields, cast booleans/numbers, remove control characters, and centralize repeatable input-cleaning rules across form requests. It should not replace validation, authorization, output escaping, or dedicated HTML purification.
  • Risk decision: Low adoption signals—0 dependents and a score of 0—mean this is a niche, legacy-oriented dependency. Any adoption decision should include an owner, compatibility test, fork/vendor plan, and exit strategy.

When to Consider This Package

  • Consider it when the product runs on Laravel 6/7-era form requests, already has many forms with duplicated sanitation code, and needs a low-effort way to make input cleaning more consistent and testable.
  • Consider it for legacy maintenance or migration work where replacing the framework is not immediately feasible and the team is willing to vendor/fork the package if upstream maintenance is insufficient.
  • Consider it when the sanitation needs are simple and deterministic—trimming, stripping tags, normalizing whitespace, casting—and the team understands that sanitation is not a security boundary by itself.
  • Look elsewhere when the application is on modern Laravel/PHP versions, when the package is unmaintained or incompatible, or when the use case requires actively maintained HTML sanitization, rich-text purification, or strict compliance controls.
  • Look elsewhere when only a few fields need cleanup, when validation alone is sufficient, or when adding a dependency introduces more upgrade and security-review cost than an internal helper.

How to Pitch It (Stakeholders)

For executives: This is a low-cost tactical option for legacy Laravel forms, not a strategic platform bet. It can reduce bespoke input-cleaning code and improve consistency in existing products, but it carries maintenance and compatibility risk. Approve only with a clear owner, a proof-of-concept, and an exit plan such as forking or replacing it during the next framework upgrade.

For engineering: The package fits naturally into Laravel form requests and can centralize repeated sanitation rules. Treat it as an implementation aid, not a security control: keep validation, authorization, and output escaping separate. Before adoption, verify Laravel/PHP compatibility, dependency health, test coverage, and license; vendor or fork if the upstream package is stale. Do not introduce it into greenfield work without a strong reason—prefer a small internal sanitizer abstraction or a maintained alternative.

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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource