I have a page which have a select with name="action_id[]", the user can add another action by clicking on a button. The new action is another select with name="action_id[]" so I end up with a view that has many selects with the same name.
when the user submits the form, I do this in the controller:
$actions = Input::get('action_id')
and I get an array.
How to validate these values? They have the same name, so I can not do this because it validates only one action_id:
$validation = Validator::make($actions, Actions::rules)
where Actions::rules is
public static $rules = array(
'action_id' => 'required|integer|not_in:0'
);
How can I validate the array of actions?