Laravel validation has a required_if:field,value... Is there any option like that for the filters?
(The use case here has to do with postal codes. I want to run a custom ZIP validator I wrote only if the country = 'USA', but I can't think of a way to do this.
If there is no option for something like this, is there a way to pass another field to a custom filter? Then I could pass the country and just do an if there...
Laravel validation has a required_if:field,value... Is there any option like that for the filters?
(The use case here has to do with postal codes. I want to run a custom ZIP validator I wrote only if the country = 'USA', but I can't think of a way to do this.
If there is no option for something like this, is there a way to pass another field to a custom filter? Then I could pass the country and just do an if there...