kmuenkel / validation-patch
Correct for various issues in Laravel Validation
Installs: 189
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/kmuenkel/validation-patch
Requires
- illuminate/validation: ^7.0|^8.0
Requires (Dev)
- barryvdh/laravel-ide-helper: ^2.8
- friendsofphp/php-cs-fixer: ^2.16
- fzaninotto/faker: ^1.9
- mockery/mockery: ^1.4
- orchestra/testbench: ^5.7
- phpmd/phpmd: ^2.9
- phpunit/phpunit: ^9.4
- squizlabs/php_codesniffer: ^3.5
This package is auto-updated.
Last update: 2025-10-08 03:48:56 UTC
README
For all fixes, simply including ValidationPatch\ValidationPatchServiceProvider in your app config will allow them to take effect automatically.
Fixes
- Dots in field names: Laravel offers the ability to escape dots in field names so that they're not mistaken for dot-delimiters for nested arrays. However, this did not apply to field references within in rules such as required_withorexclude_unless. This corrects for that.
- Forward slashes in field names: Due to a parsing errors, field names that had forward slashes, such as URI claims, would cause an error. These are now supported.
- requiredonly active if parent exists: If a nested array element carried an incarnation of the- requiredrule, it would be executed even if the parent element were optional. With this package, nested requirements only fire if the parent exists.
- Custom Rule Message Placeholders: Allow Illuminate\Contracts\Validation\Rule::message()output to be respected when aliased viaIlluminate\Support\Facades\Validator::extend(). Also allow those messages to contain placeholders such as"attribute"or":input".