Integer fields and minimum/maximum

I have an integer field that has minimum and maximum properties set.
“resultsid,length”: {
“type”: “integer”,
“minimum”: 1,
“maximum”: 99,
“default”: 1
},

I see that the validation is occurring when the values are above/below the range. However, is there a way to restrict the values to go above/below the range? I have tried with the restrict option in the UI Schema, but it doesn’t seem to help.

Hi @dcjarvisvt,

With our off the shelf renderer sets this is only possible with the slider variant, see here for an example.

Of course you can always implement a custom renderer which prevents entering any number outside the range.

Thanks Stefan, I was thinking the slider as well.
With the slider, is there a way to display the value # in the slider so you can visualize the actual value or is that a custom renderer?

Our slider renderer sadly does not have that feature. However I would be open to add that if you like to contribute. For now you will need to add a custom renderer to accomplish this.

Hi @sdirix ,

I have updated the existing render ‘MaterialSliderControl’ to add thumb label on the slider.
If I want to contribute this code, can you please guide me how to contribute this code.

@SouradeepMldt,

Cool! Please create a PR against the JSON Forms repository with the changes, including at least one test case.