Version v3 Documentation
You are viewing documentation for an older version.
View latest (v4) documentation →
Form Field Numeric Input
A pre-composed form field that wraps a NumericInput control with automatic label, helper text, and error message display. Inherits from FormFieldBase, which provides EditContext integration, auto-generated control IDs, ARIA attribute wiring, and validation error state management. Generic over TValue constrained to struct, INumber<TValue> (int, decimal, double, etc.).
Default
A basic
FormFieldNumericInput with integer binding, min/max constraints, and two-way binding via @bind-Value. The component automatically generates a unique ID to associate the label with the input for accessibility.
Loading example…
With Increment Buttons
Set
ShowButtons to true to display increment/decrement buttons. Use Step to control the increment amount and DecimalPlaces to format decimal display.
Loading example…
With Error
Use
ErrorText to manually set a validation error. Click Validate to trigger the error when the value is zero or less.
Loading example…
Disabled
Set
Disabled to true to prevent user interaction. The input and label display with reduced opacity.
Loading example…
EditForm Validation
Inside an
EditForm, validation errors from DataAnnotationsValidator display automatically. Try submitting with invalid values.
Loading example…