Customize further the "Number input" widget to restrict the input

Hi y’all !

I’m looking for an Integer type or Widget for a Smart Field. Is there such a thing out there ?

Hey @JeremyV :wave:

I’ll need a bit more information on what you want to do exactly :thinking:.

You can define a Smart Field of type Number and display it with the Number widget in the UI.
You can perform additional operations of formatting for example in the get property of your declared Smart Field (that’s the whole essence of it).

Hi @Romain_Coudour

I just need an Integer input edit widget.

I don’t want/need the user to type any float for some specific input fields.

Hey @JeremyV :wave:

Unfortunately, we do not provide this option… yet! I pushed your request to our product board :muscle::evergreen_tree:

:bulb: Meanwhile, you can set a validation layer directly in your model (data validation) or override/extend the corresponding route with your own validation logic.

I hope this helps,
See you around!

Indeed this is what I’m going to do.

Take care !