Closed bezhermoso closed 2 years ago
Introduces a service provider which configures the Validator factory to return instances of Square\Hyrule\Validator\StrictValidator.
Validator
Square\Hyrule\Validator\StrictValidator
I was hoping that this would be built-in behavior in Laravel already, but that PR was rejected: https://github.com/laravel/framework/pull/41962
In the meantime, the ValidatesTopLevelRules trait should bring this capability to any Validator class that uses it.
ValidatesTopLevelRules
This will be the default behavior, but can be disabled by setting hyrule.strict_validator_class to a falsy value.
hyrule.strict_validator_class
Introduces a service provider which configures the
Validator
factory to return instances ofSquare\Hyrule\Validator\StrictValidator
.I was hoping that this would be built-in behavior in Laravel already, but that PR was rejected: https://github.com/laravel/framework/pull/41962
In the meantime, the
ValidatesTopLevelRules
trait should bring this capability to any Validator class that uses it.This will be the default behavior, but can be disabled by setting
hyrule.strict_validator_class
to a falsy value.