var t = $('form').serializeArray(); $.each(t, function(index, item) { if (item.value.length == 0) { formHasEmpty = true; return false; } })