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 Bundle

Validator Bundle Laravel Package

assoconnect/validator-bundle

Symfony bundle providing validators for common scalar values: email addresses, phone numbers, latitude and longitude, monetary amounts, timezones, and French RNA, SIREN, and SIRET identifiers.

View on GitHub
Deep Wiki
Context7

AssoConnectValidatorBundle is a Symfony bundle that provides ready-to-use validation constraints for common scalar values, extending Symfony's Validator component with checks that are otherwise tedious to implement by hand.

  • Contact data: email address and phone number validation
  • Geography: latitude, longitude, and timezone constraints
  • Monetary values: money format validation
  • French business identifiers: RNA, SIREN, and SIRET checks
  • Configurable options documented in each constraint's source code
Frequently asked questions about Validator Bundle
What is assoconnect/validator-bundle and what does it do?
It is a Symfony bundle that adds ready-to-use validation constraints for common scalar values on top of Symfony's Validator component. It covers contact data such as email addresses and phone numbers, geography such as latitude, longitude and timezone, monetary amounts, and French business identifiers including RNA, SIREN and SIRET. Each constraint ships as a standard Constraint and ConstraintValidator pair, so it plugs into entities, DTOs and form types the same way built-in Symfony constraints do. Options for each constraint are documented in the constraint source code rather than the README.
Is assoconnect/validator-bundle a Laravel package?
No. Despite being evaluated by Laravel developers, it is a Symfony bundle: it registers a Symfony DI extension and service definitions, depends on symfony/validator, and ships translation catalogues consumed by the Symfony translator. There is no Illuminate\Validation service provider, no Rule objects and no Laravel translation integration. In a Laravel codebase it is a foreign runtime running alongside the framework's own validator, not a drop-in replacement.
Can I use assoconnect/validator-bundle in a Laravel application?
Not as a bundle. The realistic approach for Laravel is selective code extraction: the roughly fifteen scalar constraint validators are self-contained, MIT licensed and largely regex or checksum logic, so you can port the specific classes you need into your own validation rules. The phone validator wraps giggsey/libphonenumber-for-php, which is framework-agnostic and installs cleanly via Composer. Anything tied to the Symfony translator or Doctrine column types should be left behind.
How do I install assoconnect/validator-bundle?
Install it with Composer using require assoconnect/validator-bundle. In a Symfony application with Symfony Flex the bundle is auto-registered and the service definitions are wired automatically. Without Flex you need to register the bundle in your kernel or bundles configuration and confirm the validator services are available. Usage details and examples live in doc/index.md in the repository, with per-constraint options documented in each constraint class.
Which PHP and Symfony versions does assoconnect/validator-bundle require?
Recent tags require PHP 8.3 or newer, and from v2.42.0 the floor moves to PHP 8.4. Symfony 7 is required from v2.39.0 onward, and Symfony 6 and below are dropped in current releases. The maintainer tracks the newest PHP and Symfony releases aggressively rather than holding a broad compatibility band, so older applications must pin to a stale tag or skip the package. Check the actual tag list before planning an upgrade.
What validators does assoconnect/validator-bundle provide?
The documented set includes email address, phone number, latitude, longitude, monetary value, timezone, French RNA, French SIREN and French SIRET constraints. Evaluation notes also reference Belgian enterprise number, EU VAT and NIF validators in the codebase, which lean francophone and Benelux. Constraints are stateless and DI-friendly, so you can apply them incrementally to form types, DTOs, API request validation or console import jobs. Options such as allowed formats or strictness flags are described in each constraint's source.
Does it validate French SIREN, SIRET and RNA identifiers?
Yes. The bundle ships dedicated FrenchRnaValidator, FrenchSirenValidator and FrenchSiretValidator constraint classes that handle the Luhn-style checksum and format rules you would otherwise hand-code. These are useful for French invoicing, company registration and association data. If your product is US, UK or APAC focused, these identifier constraints carry no value and only add surface area, so port just the scalar validators you actually need.
Does phone number validation need libphonenumber?
Yes, the phone constraint wraps giggsey/libphonenumber-for-php rather than reimplementing phone parsing. Note that the dependency moved from ^8.13 to ^9.0 inside a patch release at v2.42.2, which means parsing semantics and metadata changed under a non-major bump. If you adopt or port the phone validator, pin the libphonenumber version explicitly and add regression tests around the numbers you accept.
Are the validation error messages translated?
Yes, the bundle ships en, fr and es translation catalogues that are consumed by Symfony's translator, so messages follow the application locale automatically. If you port constraint classes into Laravel, you lose that catalogue and must rebuild the messages in Laravel's own translation files. Budget for that work, since validation messages are user-facing and often need product or legal review in each locale.
Is assoconnect/validator-bundle actively maintained, and what are the Laravel alternatives?
It is actively released by a single organization with a small maintainer group and very few dependents, so the bus factor is low and compatibility patches will not appear from the community. The MIT license means you can fork, but a fork is a standing maintenance commitment, and the metadata shows a future-dated release that should be verified against the real tag list. For Laravel teams, the lighter path is usually native validation rules plus targeted packages such as a dedicated phone rule and a standalone email validator, porting SIREN, SIRET or RNA checksum logic only if those identifiers are genuinely in scope for the next 24 months.
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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast