devilcius/extra-validator-bundle
Symfony bundle adding extra validators for common Spanish form fields. Includes CCC (Código Cuenta Cliente) bank account validation and NIF/DNI fiscal ID validation. Install via Composer and configure constraints in validation.xml for your entity properties.
league/iban for global bank account validation.symfony/validator for generic constraints.bacon/bacon-qr-code for other document types (e.g., QR-based IDs).spanish-id-validator.re (regex) or libraries like pynif.apache.commons-validator.| Use Case | Symfony Package | Laravel Package | Custom Solution |
|---|---|---|---|
| Spanish CCC Validation | devilcius/extra-validator-bundle |
None (reimplement) | Regex + business logic |
| Spanish NIF/DNI | devilcius/extra-validator-bundle |
None (reimplement) | Regex + letter checksum |
| Global IBAN Validation | league/iban |
bacon/bacon-qr-code |
API calls to banks |
| Generic Constraints | symfony/validator |
laravel/validation |
FormRequest rules |
*"This package lets us quickly add Spanish-specific validation (like bank account or tax ID checks) without building custom code—saving dev time and reducing errors. For example:
It’s a low-cost, high-impact way to support localization and compliance. The risk is minimal—if the package isn’t maintained, we can extract the rules and own them."*
*"This Symfony bundle provides two key validators for Spanish inputs:
12345678A).Why use it?
validation.xml.Validator::extend() rules or Rule objects. Example:
Validator::extend('ccc', function ($attribute, $value) {
return preg_match('/^\d{20}$/', $value) && /* checksum logic */;
});
Trade-offs:
Recommendation: Use it for Symfony projects or reimplement the logic in Laravel if we’re committed to Spanish validation. Either way, we avoid reinventing the wheel."*
*"This package addresses two key pain points:
When to Prioritize:
When to Skip:
Next Steps:
How can I help you explore Laravel packages today?