New to Telerik UI for Blazor? Start a free 30-day trial

Telerik Validation Message for Blazor

Updated on Oct 1, 2026

The Telerik Validation Message for Blazor adds built-in styling and customization options on top of the standard .NET ValidationMessage, such as Template and Class parameters.

Basics

To use a Telerik Validation Message:

  1. Add the <TelerikValidationMessage> tag.
  2. Set the For parameter in the same way as with a standard Blazor <ValidationMessage>. There are two options:
    • If the TelerikValidationMessage is in the same component as the Form or if the Form model object is available, use a lambda expression that points to a property of the Form model.
      RAZOR
      <TelerikValidationMessage For="@(() => Customer.FirstName)" />
      
      @code {
          private CustomerModel Customer { get; set; } = new();
      
          public class CustomerModel
          {
              public string FirstName { get; set; } = string.Empty;
          }
      }
    • If the validation message is in a child component that receives a ValueExpression, set the For parameter directly to the expression, without a lambda.
      RAZOR
      <TelerikValidationMessage For="@FirstNameExpression" />
      
      @code {
          [Parameter]
          public Expression<System.Func<string>>? FirstNameExpression { get; set; }
      }

Refer to the following sections for additional information and examples with the Telerik Form and standard Blazor <EditForm>.

Using with TelerikForm

The Telerik Form displays inline validation messages by default if validation is enabled. You may need to define <TelerikValidationMessage> components manually when you want to:

Use Telerik ValidationMessage in a TelerikForm

Example
View Source
Loading ...

Using with EditForm

In an existing Blazor EditForm, replace the <ValidationMessage> tags with <TelerikValidationMessage> tags. The For parameter is set in the same way for both validation components.

Use Telerik ValidationMessage in an EditForm

Example
View Source
Loading ...

Template

The Telerik ValidationMessage allows you to customize its rendering with a nested <Template> tag. The template context is an IEnumerable<string> collection of all messages for the validated model property.

Using ValidationMessage Template

Example
View Source
Loading ...

Class

Use the Class parameter of the Validation Message to add a custom CSS class to the span.k-form-error. This element holds the validation message.

Using TelerikValidationMessage Class

RAZOR
<TelerikValidationMessage Class="bold-blue"
                          For="@(() => Employee.FirstName)" />

<style>
    .bold-blue {
        font-weight: bold;
        color: blue;
    }
</style>

Next Steps

See Also