Description of the limitation and why it is relevant to address
As a developer I want to ensure communicate clearly to the user that a field should have a value in a simpler way than now, which requires setting up UserErrors, InputValidations and the like, so that developments are easier and cleaner.
I think this is relevant for the VIKTOR platform because it simplifies developments, and improves user experience.
Submitter proposed design (optional)
Add an argument to the Field, e.g.:
length = vkt.NumberField("Length", default=10, min=1, max=100, allow_empty=False)
When the field is empty, it renders similar to the min/max arguments, highlighting it as red, with the standard message that it requires to be filled.
Current workarounds
- raise UserError in code
- InputValidation
- on_next on next Step