Skip to content

Number Inputs

mdoyle023 edited this page Mar 19, 2021 · 4 revisions

Number inputs support integers and floating-point numbers.

Property Value Use Example
*type "integer" Indicates that the schema object should be rendered as a number input "type": "integer"
*name String The corresponding label for the form element "name": "Form Display Name"
helpText String Will display as an information icon next to the form element. The provided string will display when the user hovers over the icon. "helpText": "This is help text that can be very long."
tooltip String The tooltip that will display when hovering over the form element "tooltip": "Too tip for the form element."
default Number The default value that should be in the input. "default": 100
isReadOnly boolean This property indicates that the input control cannot be changed by the user. Any data within a readonly field will not be returned upon form submission. "isReadOnly": true
isHidden boolean This flag will hide the element from the view of the user. However, this can still be programmatically set. "isHidden": true
exclusiveMaximum integer Indicates that only values which are strictly less than this number are valid. "exclusiveMaximum": 100
exclusiveMinimum integer Indicates that only values which are strictly greater than this number are valid. "exclusiveMinimum": -1
maximum integer Indicates that only values which are less than or equal to this number are valid. "maximum": 100
minimum integer Indicates that only values which are strictly greater than or equal to this number are valid. "minimum": 0
* = required property

Example

"ageField": {
    "type": "integer",
    "name": "Age"
    "tooltip": "Age in years 
    which must be equal to or greater 
    than zero."
}

Number Input Validation

Please note that if neither exclusiveMinimum nor minimum are specified in the schema, an exclusiveMinimum value of 0 will be set.

2.1.0

  • Enhancement Added the ability to define exclusiveMaximum, exclusiveMinimum, maximum, and minimum

2.0.0

  • Breaking Change: Changed "number" keyword to "integer" to reflect actual functionality.
  • Enhancement: Added the ability to make a control readonly
  • Enhancement: Added the ability to hide a form control
  • Enhancement: Added the basic number input functionality
Clone this wiki locally