What you were expecting:
I expected that the NumberInput component supports min and max props as specified in the documentation.
What happened instead:
It seems that the input does not prevent the user to input an out of range value.
Related code:
I added the code needed to reproduce the issue in that codesandbox.
You can find the component inside post's Miscellaneus section (field "Average Note")
https://codesandbox.io/s/misty-frog-2u2vu
https://codesandbox.io/s/misty-frog-2u2vu?file=/src/posts/PostEdit.js (line 125)
<NumberInput source="average_note" max="5" min="1" step="0.5" />
Other information:
It can be a misunderstanding reading the documentation, or maybe it is better to add some usage examples.
For this, I use validate props and utils.
Confirmed, this is a material-ui bug (see https://github.com/mui-org/material-ui/issues/11377) that we can hide in react-admin.
However, this will only affect the arrows - users will still be able to enter a numeric value higher than the max ans lower than the min. You should add a validate function, as explained by @kopax .