geekcom/validator-docs
Automatically generate documentation for Laravel validation rules. It scans your application's rules and outputs clean Markdown tables covering each rule, its parameters, and descriptions, keeping your validation docs in sync with your code via a simple Artisan command.
The 3.12.0 release adds validation for alphanumeric CNPJ, which is a timely feature given Brazil’s planned transition to alphanumeric CNPJ identifiers. Architecturally, geekcom/validator-docs fits the Laravel ecosystem as a Composer-installed validation package that plugs into Laravel’s validator and FormRequest patterns. The change appears additive rather than breaking, so integration feasibility is high for teams already using Laravel validation rules.
Technical risk is moderate but manageable. The key risk is whether the new alphanumeric CNPJ rule correctly implements the official check-digit algorithm, handles formatted and unformatted input, and preserves existing numeric CNPJ behavior. Because the release notes only mention the feature and a first-time contributor, the assessment should verify test coverage, documentation, and whether the new validation is opt-in or changes the existing cnpj rule. Other risks include PHP/Laravel version compatibility, dependency conflicts, and downstream systems that may not yet accept alphanumeric CNPJ values.
Key questions: Is alphanumeric CNPJ validation a new rule or a behavior change to the existing CNPJ rule? Does it validate both legacy numeric and new alphanumeric CNPJ formats? Are check digits implemented per the official Receita Federal specification? What Laravel and PHP versions are supported? Is there sufficient test coverage and documentation for production use?
Stack fit is strong for Laravel applications that already rely on package-based validation rules. Integration is typically limited to updating the Composer constraint to ^3.12, running the test suite, and applying the new rule in FormRequests or validators where alphanumeric CNPJ input is expected. Existing numeric CNPJ validation should remain in place for legacy records unless the package explicitly documents a safe default change.
The migration path should be staged: upgrade in a non-production environment, confirm existing numeric CNPJ tests still pass, add targeted tests for alphanumeric CNPJ inputs, then introduce the new rule only in flows that must accept the new format. Compatibility checks should include Laravel version, PHP version, and any custom validation extensions that may wrap or override the package’s CNPJ rule. Database impact is likely minimal because CNPJ remains 14 characters, but storage and downstream integrations should be reviewed for character-set assumptions.
Sequencing: 1) upgrade the package in a branch; 2) run regression tests for all existing document validations; 3) add unit and feature tests for alphanumeric CNPJ, including formatted/unformatted and invalid check-digit cases; 4) update form validation, frontend masks, and API contracts; 5) coordinate with downstream systems that store or process CNPJ; 6) release behind normal deployment controls and monitor validation failures.
Maintenance impact is low to moderate. The package is small and focused, but it is community-maintained, so version pinning and periodic dependency review are advisable. Support should rely on the package’s issue tracker and documentation, with an internal fallback validation rule if the feature becomes business-critical before broader ecosystem support matures.
Scaling impact is negligible because document validation is CPU-light and typically runs at request or form-validation time. The main operational failure modes are false validation results from an incorrect alphanumeric algorithm, legacy systems rejecting letter-containing CNPJ values, frontend masks that still assume numeric-only input, and dependency conflicts during Laravel upgrades. Ramp-up for Laravel developers is low: the package follows standard Laravel validation conventions. Teams should document the new rule usage, add representative test fixtures, and train support staff on the alphanumeric CNPJ transition so customer-facing errors are handled correctly.
How can I help you explore Laravel packages today?