I have a TextField with some validation i need:
minValue = 1
maxValue = 10
These validations work if I use arrows from TextField, but if I type directly into it, I could type any number. How would i fix/validate this
<TextField
label="Selectati nota"
type="number"
id={subject._id}
value={subject.gradeData.grade}
onChange={(ev) => updateGrade(ev)}
disabled={loading}
size="small"
InputLabelProps={{style: {fontSize: 18, color:"#3F51B5"}}}
InputProps={{
style: {
fontSize:18, fontWeight:"bold"
},
inputProps: {
min: 1,
max: 10,
maxLength: 2,
// pattern: "^[1-9]d*$",
},
}}
style={{ width: 150, marginLeft: 10 }}
variant="filled"/>