Class RadzenEmailValidator
A validator component that verifies whether a text input contains a valid email address format. RadzenEmailValidator uses the .NET EmailAddressAttribute to validate email format according to standard rules. Must be placed inside a RadzenTemplateForm<TItem> and associated with a named input component. Checks email format using System.ComponentModel.DataAnnotations.EmailAddressAttribute validation rules. Empty or null values are considered valid - combine with RadzenRequiredValidator to ensure the field is not empty. The validation runs when the form is submitted or when the component loses focus.
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenEmailValidator : ValidatorBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IRadzenFormValidatorExamples
Basic email validation:
<RadzenTemplateForm TItem="Model" Data=@model>
  <RadzenTextBox style="display: block" Name="Email" @bind-Value=@model.Email />
  <RadzenEmailValidator Component="Email" Text="Please enter a valid email address" Style="position: absolute" />
</RadzenTemplateForm>
@code {
 class Model
  {
   public string Email { get; set; }
 }
 Model model = new Model();
}Combined with required validator:
<RadzenTextBox Name="Email" @bind-Value=@model.Email />
<RadzenRequiredValidator Component="Email" Text="Email is required" />
<RadzenEmailValidator Component="Email" Text="Invalid email format" />Constructors
RadzenEmailValidator()
A validator component that verifies whether a text input contains a valid email address format. RadzenEmailValidator uses the .NET EmailAddressAttribute to validate email format according to standard rules. Must be placed inside a RadzenTemplateForm<TItem> and associated with a named input component. Checks email format using System.ComponentModel.DataAnnotations.EmailAddressAttribute validation rules. Empty or null values are considered valid - combine with RadzenRequiredValidator to ensure the field is not empty. The validation runs when the form is submitted or when the component loses focus.
Declaration
public RadzenEmailValidator()Examples
Basic email validation:
<RadzenTemplateForm TItem="Model" Data=@model>
  <RadzenTextBox style="display: block" Name="Email" @bind-Value=@model.Email />
  <RadzenEmailValidator Component="Email" Text="Please enter a valid email address" Style="position: absolute" />
</RadzenTemplateForm>
@code {
 class Model
  {
   public string Email { get; set; }
 }
 Model model = new Model();
}Combined with required validator:
<RadzenTextBox Name="Email" @bind-Value=@model.Email />
<RadzenRequiredValidator Component="Email" Text="Email is required" />
<RadzenEmailValidator Component="Email" Text="Invalid email format" />Properties
Text
Gets or sets the error message displayed when the email address format is invalid. Customize this message to provide clear feedback to users about the expected email format.
Declaration
[Parameter]
public override string Text { get; set; }Property Value
| Type | Description | 
|---|---|
| string | The validation error message. Default is "Invalid email". | 
Overrides
Methods
Validate(IRadzenFormComponent)
Runs validation against the specified component.
Declaration
protected override bool Validate(IRadzenFormComponent component)Parameters
| Type | Name | Description | 
|---|---|---|
| IRadzenFormComponent | component | The component to validate. | 
Returns
| Type | Description | 
|---|---|
| bool | 
 |