Number Field
Numeric input with min, max, precision, and step validation.
Number Field
The number field renders a numeric input with validation constraints.
Schema Properties
Prop
Type
UI Options
Same as Text Field.
Basic Usage
const schema = defineSchema({
fields: [
{
type: "number",
name: "age",
label: "Age",
required: true,
min: 18,
max: 120,
},
],
});Examples
With Precision
{
type: "number",
name: "price",
label: "Price",
min: 0,
max: 9999.99,
precision: 2,
step: 0.01,
}With Step Increment
{
type: "number",
name: "quantity",
label: "Quantity",
min: 0,
max: 100,
step: 5,
}Auto-Derived Validators
| Property | Validator |
|---|---|
required: true | required |
min | min |
max | max |
precision | precision |
step | step |