HxValidationMessage

Displays a list of validation messages for a specified field within a cascaded HxValidationMessage.EditContext.
Reimplementation of Blazor ValidationMessage as Bootstrap 5 validation (using .invalid-tooltip).
Used by HxInputBase and derived components.

You usualy don't use the HxValidationMessage in your code. It is encapsulated in HxInputXy components.

Custom validation message #

You can disable the encapsulated validation message with ShowValidationMessage="false" and use your own instance of HxValidationMessage.

API

Parameters

Name Type Description
EditContext EditContext EditContext. For exceptional use where EditContext is not used as a CascadingParameter.
For Expression<Func<TValue>> Specifies the field for which validation messages should be displayed. Mutual exclusive with ForFieldName and ForFieldNames.
ForFieldName string Specifies the field for which validation messages should be displayed. Mutual exclusive with For and ForFieldNames.
ForFieldNames string<> Specifies the field for which validation messages should be displayed. Mutual exclusive with For and ForFieldName.
An unhandled error has occurred. Reload 🗙