added "maxlength" support