I may be late in here, but found this:
max: Valid for
number , and
range , it defines the greatest value in the range of permitted values.
maxlength: Valid for
email , and
password , it defines the maximum number of characters (as UTF-16 code units) the user can enter into the field.
So as I understand here, max is better used for input types related with numbers.
Correct me if I’m wrong.
Here the link: