test if variable is an array before iterate
change jquery validate error placement