Laravel "At Least One" Field Required Validation
Try checking out required_without_all:foo,bar,...
, it looks like that should do it for you. To quote their documentation:
The field under validation must be present only when the all of the other specified fields are not present.
Example:
$rules = array(
'facebook_id' => 'required_without_all:twitter_id,instagram_id',
'twitter_id' => 'required_without_all:facebook_id,instagram_id',
'instagram_id' => 'required_without_all:facebook_id,twitter_id',
);
$validator = Validator::make(Input::all(), $rules);
**For automatic validation**
$rules = array(
'facebook_id' => 'required_without_all:twitter_id,instagram_id',
'twitter_id' => 'required_without_all:facebook_id,instagram_id',
'instagram_id' => 'required_without_all:facebook_id,twitter_id',
);
$message = array(
'facebook_id' => 'The facebook field is required when none of twitter / instagram are present.',
'twitter_id' => 'The twitter field is required when none of facebook / instagram are present.',
'instagram_id' => 'The instagram field is required when none of twitter / facebook are present.');
$validator = Validator::make(Input::all(), $rules, $message)->validate();