Hi Im trying to validate an array inputs like this.
{!!Form::open()!!}
<input type="text" name="value1[]">
<input type="text" name="value1[]">
{!! Form::submit('submit') !!}
{!! Form::close()!!}
This is my controller
$rules = [
'value1[]' => 'required|array',
];
$data = $request->all()
$validator = Validator::make($data, $rules);
if ($validator->fails())
{
return redirect()->back()->withErrors($validator->errors());
}
Unfortunately, it doesn't seem to work. How do you validate an input fields in laravel using laravel jsvalidation? This is the package I am using https://github.com/proengsoft/laravel-jsvalidation/issues/174
Thanks,
value1is array or not ? Or you want to validate individual elements inside the arrayvalue1