function hasRequiredAttributes(elem)
{
return elem.attr("type").toLowerCase() === "number" &&
!isNaN(parseFloat(elem.attr("max"))) &&
!isNaN(parseFloat(elem.attr("min"))) &&
!isNaN(parseFloat(elem.attr("step")));
}
!isNaN(parseFloat(elem.attr("max"))) results in false when the attribute is missing.