Added maxlength attribute, in support of #221