A quick function yielding an object with all of a form's fields' (HTML5) validity states

/**
 * @param {Node} formNode
 *
 * @return {Object}
 */
function validateForm(formNode) {
  return Array.from(formNode.querySelectorAll("input, select, textarea")).reduce((acc, field) => ({
    ...acc,
    [field.getAttribute("name")]: field.validity
  }), {});
}