BuzzForm
BuzzFormDocs

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

PropertyValidator
required: truerequired
minmin
maxmax
precisionprecision
stepstep

On this page