Add maxlength attribute

Added a simple "maxlength" attribute.