[Vuejs]-Array laravel validation " * " returns true

0👍

Try this rule

$rules = [
     'location_id'  =>  'required|array|min:1',
     'location_id.*.id'  =>   'required',
     'station_id.*.id'  =>   'required'
];

Add 'station_id' => 'required|array|min:1' to $rules if you want to return false if station_id is empty.

Leave a comment