- Can I install ideup/extra-validator-bundle in a Laravel app?
- Not as a working Laravel validation package. It is published as a Symfony2 bundle that registers through a DependencyInjection Extension and service tags, not a Laravel ServiceProvider, ValidationRule, config-publish hook, or facade. Installing it with Composer will not give you Laravel validator rules you can use in FormRequest or Validator::make. The viable path is to extract the checksum logic and implement it as first-party Laravel rules.
- What formats does ideup/extra-validator-bundle validate?
- The bundle advertises extra constraints for Spanish identity documents such as DNI, NIE, and CIF, along with IBANs and phone numbers. The technical evaluation also references Spanish postcode validation at capture. These are common formats not covered by Symfony's core validator rules, with customizable violation messages.
- Is ideup/extra-validator-bundle compatible with Laravel 10, Laravel 11, or Laravel 12?
- No, not out of the box. It targets Symfony's Validator component and Symfony2-era APIs, and there is no Laravel ServiceProvider or ValidationRule bridge. The recommended port to Laravel 9 through 12 on PHP 8.1 through 8.4 is low risk because the underlying DNI, NIE, CIF, and postcode logic is deterministic and framework-light. Do not schedule a symfony/validator bridge spike expecting it to work; fork or reimplement instead.
- How do I install and configure ideup/extra-validator-bundle?
- In Symfony you would install it via Composer and register the bundle in the Symfony application kernel, then use its constraints in the standard validator configuration. In Laravel there is no config/app.php provider entry, no publishable config, and no facade to register. Because the package is not Laravel-native, installation in a Laravel app is not recommended; port the four checks into app/Rules or an internal package.
- How do I port DNI, NIE, CIF, and Spanish postcode validation to Laravel?
- Extract the deterministic PHP logic into four invokable rules: SpanishDni, SpanishNie, SpanishCif, and SpanishPostcode. Implement Illuminate\Contracts\Validation\ValidationRule and return translatable :message() output. The evaluation estimates a 1 to 2 day port with a test suite. Keep the rules stateless and dependency-free, with no database, queue, or cache interaction.
- What are the DNI, NIE, and CIF checksum rules I need to port?
- DNI is 8 digits plus a mod-23 letter; NIE uses an X, Y, or Z prefix plus 7 digits plus a mod-23 letter; CIF uses an entity-type-dependent control character. Spanish postcodes are 5 digits with province codes 01 through 52, and boundary cases such as 01000 and 52999 should be tested. Also confirm CIF control-letter versus control-digit branches and Canary Islands or Ceuta-Melilla postcode handling.
- Is ideup/extra-validator-bundle maintained and safe for production?
- Treat it as high risk for production dependency. Symfony 2.x has been end-of-life since 2018, the constraints likely use getDefaultOption and setDefaultOption APIs removed in Symfony 3.0, and Composer pins may conflict with PHP 8.1+ and Laravel 10+. Signal quality is poor: 9 stars, 0 dependents, a composite score of 0.315, a package and repository name mismatch, and no visible CI or test suite. Harvest the algorithm and discard the packaging.
- Does ideup/extra-validator-bundle include tests or reusable fixtures?
- There is no visible CI or test suite in the evaluation, so you cannot rely on reusable fixtures. You should build a hand-made vector table covering valid and invalid DNI, NIE for each X, Y, and Z prefix, CIF across letter classes, and postcode boundaries like 01000 and 52999. Add negative cases for whitespace, lowercase, and 9-digit inputs, then run them through Pest or PHPUnit data providers.
- What license does ideup/extra-validator-bundle use, and can I vendor its logic?
- The license is not established in the provided context, so check the repository LICENSE before copying anything. If it permits vendoring, extract the algorithms into your proprietary codebase with attribution as required. If not, reimplement the published checksum specifications independently and keep no runtime reference to the upstream repo.
- What are the best alternatives to ideup/extra-validator-bundle for Laravel?
- Build first-party Laravel ValidationRule classes or an internal Composer package instead of bridging Symfony's validator into Laravel. A symfony/validator bridge imports a large unrelated dependency tree for four small checksum functions, which is not a good trade. If a launch date is fixed, ship a permissive format-only regex first and tighten to checksum validation in the next sprint, pairing the postcode rule with explicit country selection.