Version v3 Documentation
You are viewing documentation for an older version.
View latest (v4) documentation →
Form Field Currency Input
A pre-composed form field that wraps a CurrencyInput 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.
Default
A basic
FormFieldCurrencyInput with a label, placeholder, and two-way binding via @bind-Value. The currency symbol is displayed automatically based on the CurrencyCode (defaults to USD).
Loading example…
Multiple Currencies
Use the
CurrencyCode parameter to specify the ISO 4217 currency code. The component automatically displays the correct currency symbol for each code.
Loading example…
With Constraints
Use
Min, Max, and AllowNegative to constrain the input range. Values outside the range are clamped automatically.
Loading example…
With Error
Use
ErrorText to manually set a validation error. Click Validate to trigger the error when the amount is zero or less.
Loading example…
Disabled
Set
Disabled to true to prevent user interaction. The input displays with reduced opacity.
Loading example…
EditForm Validation
Inside an
EditForm, validation errors from DataAnnotationsValidator display automatically. Try submitting without entering a valid salary.
Loading example…