**1.** I want to limit the input type text field length to 6 (which means allow numbers only from 0 to 999999 range).

**2.** Even if it is of type number it allows entry of E, e, -, + . How to prevent this too.

I have tried setting the min=0, max=999999 and maxlength=6 etc but none of them worked for me.
Given bellow my input field code in react.

```
              <TextField
                id="sampleFiled"
                label="VCode"
                type="number"
                required
                className="text-field"
                value={this.state.code}
                margin="normal"
              />

```