Number validation error when optional field does not include ZERO

I had stumbled upon this bug before, but I never asked if I was doing something wrong or missing something really foolish…

if a number field is set to have a minimum value which does not include ZERO, the UNCHANGED field does not validate, so the user is not allowed to leave the field without changing it’s value, hence the field is effectively working as a REQUIRED one…
In fact, even SC_CHANGED returns TRUE when the field has had no user input
This also happens if the field supports negative values that do not include ZERO.

This happens both in forms and control apps.

to reproduce:

  • create a control app
  • add an integer or decimal field
  • set a min/max range that does NOT include ZERO (eg: min=5, max=10, or min=-20, max=-2)
  • run the app, and do not enter anything… .just press SAVE or OK.
  • the validation will fail

This also happens if the field is initialized with a NULL value (either by hardcode, or by SQL query)

am I missing something?