max_if
is a custom validation which is consists of reqired_if
and max
validations.
It is usable when you want to validate the size of a file when another field is equal to any value.
max_if:anotherfield,value,...
The field under validation must be present if the anotherfield field is equal to any value.
The field under validation must be less than or equal to a maximum value.
This validation just accepts file fields!
class AppServiceProvider extends ServiceProvider