$.validator.
    addMethod("number_max", function(value, element, max) {
      return value.length === 0 ? true : toNumber(value) <= max;
    });