adash,
form.on("input change", ".required, .city-id, #parent_cat_id, #category_id", function(event) {
var el = this;
var ok = el.value.trim();
el.classList.contains("city-id") && (el = el.parentNode);
ok && ok != "0" && el.classList.remove("empty_field")
})
function audit(current_tab) {
var elems = $(".required, .city-id, #parent_cat_id, #category_id", current_tab);
return [].every.call(elems, function(el, i) {
var ok = el.value.trim();
el.classList.contains("city-id") && (el = el.parentNode);
ok && +ok != 0 ? el.classList.remove("empty_field") :
el.classList.add("empty_field");
return ok && ok != "0"
});
}