The question seems simple but I cannot seem to find a solution on stackoverflow or any other source.
jQuery validation (unobstrusive) is perfect while managing fields.
However, can we check a collection length with it?
Using data- on the form for example?
Why
You may say OK but why don't you just check it with a javascript method?
The real thing is that I am using MVC3 custom data annotations to generate the validation code for me.
So it would be better to only have to set an attribute on the MVC model, and to let jQuery validate handle all the checkings and generate the errors messages in the error summary.
I've seen validation for:
But nothing that handles the minimum of a collection.
Is there any way to handle some kind of "collection logic?" (client side)
no field = no validation, that's the problem I have for the moment
Everything works for the server-side, but since there is no field, there's no data.