It just doesn't seem to work in my codes. I am trying to validate a form using JQuery form validation where one of my field has an array of Images (or list of file inputs). i fiddled around with a lot of different options but at no veil.
Here is what i want to do : Suppose I have a form and it has an input field which takes multiple images:
{!! Form::file('images[]', array('multiple'=>true,'id'=>'images', 'class' => 'form-control btn btn-default') ) !!}
I tried the following:
$( "#myform" ).validate({
rules: {
images[]: {
required: true,
accept: "image/*"
}
},
messages:
{
images[]: "Title field cannot be blank!"
}
});