Add length attribute option

If it is provided, it's going to be added to the field as a maxlength
attribute