joshbrw / laravel-validation-rule-registration
A package that is designed to help aid rapid development and registration of custom Validation Rules in Laravel
Installs: 3 050
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: >=7.0
- illuminate/support: ^5.4
README
A package that is designed to help aid rapid development and registration of custom Validation Rules in Laravel
Usage
- Create your Validation Rule class, ensure it implements the
Joshbrw\ValidationRule\Contracts\ValidationRule
contract. - In your service provider
use RegistersValidationRules
- In the
boot()
method of your service provider;- To register a validation rule:
$this->registerValidationRule('rule_name', RuleClass::class)
- To register a validation replacer:
$this->registerValidationReplacer('rule_name', RuleClass::class);
- To register a validation rule: