How to get attribute name in JS validation


I have a form with Kartik file input in it, the name of that field is imagesGallery[].

And i’m trying to validate it with the methods from here cookbook but i’m not able to catch that field at all.

$('#post-form').yiiActiveForm('find', 'model-PostImage[imagesGallery][]').value

the above doesn’t work in any combination.

So, is there an option where i can retrieve in console for a form id all the attributes name that i can manipulate?

Thank you!

I found the attribute name in the <script> tag at the end of the document in source and figured it out from there.