add maxlength text

fixes #1066

all credit to @adeelejaz