I got a problem with validation rules with nested conditions.
class StoreRequest extends Request
{
public function authorize(){
return true;
try this pass the value directly refer: https://www.npmjs.com/package/validatorjs
"required_if:anotherfield,value"
The field under validation must be present and not empty if the anotherfield field is equal to any value.
'type_id' => 'required|integer', 'external_id' => 'required_if:type_i,3|integer',