Add maxLength attributes