Commit 3e440132 authored by Korko's avatar Korko
Browse files

Fix partner being a string if -1 instead of a numeric resulting in undefined index

parent 6dead42d
......@@ -46,7 +46,7 @@ class RandomFormRequest extends Request
$rules += [
'email.'.$key => 'required_without:phone.'.$key.'|email',
'phone.'.$key => 'required_without:email.'.$key.'|numeric|regex:#0[67]\d{8}#',
'partner.'.$key => (isset($this->request->get('partner')[$key]) && $this->request->get('partner')[$key] !== '-1') ? 'sometimes|numeric|fieldinkeys:name,'.$key : '',
'partner.'.$key => (isset($this->request->get('partner')[$key]) && $this->request->get('partner')[$key] !== '-1') ? 'sometimes|numeric|fieldinkeys:name,'.$key : 'sometimes|numeric',
];
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment