You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 1, 2020. It is now read-only.
When using the playground in https://rjsf-team.github.io/react-jsonschema-form/ I can make use of minimum, maximum and multipleOf and they are working correctly. To reproduce, go to "numbers" example (click on button Numbers at the top of the page) and add to the "number" field in the JSON schema these properties:
"minimum": 0,
"maximum": 100,
"multipleOf": 0.5
You can see it in action in the next gif
Here I show how the step is working (going up and down 0.5 in each click) and the minimum limit is working too (I kept clicking down but the number remained in 0).
When I test this in rjsf-material-ui playground, this is not working at all. I don't get the limit nor the step working as expected. I didn't have the time to check the code to see what can be wrong, but I wanted to add the issue at least to let this open until someone can fix it.
To reproduce this issue, you should add this in the JSON schema for the "number" field:
"minimum": 0,
"maximum": 100,
"multipleOf": 0.5
and this in the uiSchema:
"number": {
"ui:widget": "updown"
}
With these changes, it is working like this:
But it seems that the "multipleOf" is being used to validate, because if I write a number that is not a multiple of 0.5, I get this:
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When using the playground in https://rjsf-team.github.io/react-jsonschema-form/ I can make use of minimum, maximum and multipleOf and they are working correctly. To reproduce, go to "numbers" example (click on button Numbers at the top of the page) and add to the "number" field in the JSON schema these properties:
You can see it in action in the next gif
Here I show how the step is working (going up and down 0.5 in each click) and the minimum limit is working too (I kept clicking down but the number remained in 0).
When I test this in rjsf-material-ui playground, this is not working at all. I don't get the limit nor the step working as expected. I didn't have the time to check the code to see what can be wrong, but I wanted to add the issue at least to let this open until someone can fix it.
To reproduce this issue, you should add this in the JSON schema for the "number" field:
and this in the uiSchema:
With these changes, it is working like this:
But it seems that the "multipleOf" is being used to validate, because if I write a number that is not a multiple of 0.5, I get this:
The text was updated successfully, but these errors were encountered: