boekkooi / JqueryValidationBundle

Jquery validation form bundle for symfony 2
MIT License
27 stars 26 forks source link

constraints on collection #43

Open abdulbasitnawab opened 7 years ago

abdulbasitnawab commented 7 years ago

Hi I am using collection type with my custom entry_type. It is actually the collection of files for a project. the validation works only for the first item I check in your example where you use tags as collection. In your example in the generated javascript it looks for all the tags ie using .find to find all occurances of collections and then apply the js validation. In my code it is validating the first one mean not using the .find to apply the validation on all collections. Urgent help will be appreciatged.

abdulbasitnawab commented 7 years ago

It is something same is the issue#16 ie the first field is showing the expected message while the new fields added by clicking the add button shows the different messages. Further I am using file so there are so many constraints ie type, size etc. Which I want to be implemented in the new rows also.

boekkooi commented 7 years ago

Hi @abdulbasitnawab,

Thank you for reporting you issue. Would it be possible for you to provided me this a gist containing the form so I can try and figure out what is going wrong? The only thing I can currently think of is that you forgot to following the Collection prototype instructions in the docs.