adds min and max input length