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
When defining field validators in globalConfig.json, we should be able to be more specific about numbers that are acceptable.
That are integers in most cases, but JavaScript number (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) accepts floats as well.
Proposed options would be to reflect explicitly the type in validator type - eg. "number.integer" or implicitly in range values - eg. "range": [0, 1.0] if float number is expected; "range": [0, 1] would mean that only value 0 or 1 is expected.
The text was updated successfully, but these errors were encountered:
We probably can introduce a new type for only integer numbers.
artemrys
transferred this issue from splunk/addonfactory-ucc-base-ui
Oct 4, 2023
artemrys
changed the title
number validators should be more specific about integers
Feature request: Number validators should be more specific about integers
Oct 10, 2023
one more thing - number validator to support only min or max. Sometimes I want number to be positive (for example, interval), without setting the upper limit
When defining field validators in globalConfig.json, we should be able to be more specific about numbers that are acceptable.
That are integers in most cases, but JavaScript number (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) accepts floats as well.
Proposed options would be to reflect explicitly the type in validator type - eg. "number.integer" or implicitly in range values - eg. "range": [0, 1.0] if float number is expected; "range": [0, 1] would mean that only value 0 or 1 is expected.
The text was updated successfully, but these errors were encountered: