Hola.
Usando el bucle asociativo sería algo así:
<form onsubmit="return validar(this)"...>
Y validar se definiría:
function validar(f) {
vale = true;
for (control in f) if (f[control].name.substr[0, 5] == "cant[")
vale = vale && f[control].value != "";
return vale;
}
Está "a capella" así que puede tener algún error (somos humanos)
Saludos