Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class ValidatorBase

    Base class of Radzen validator components.

    Inheritance
    System.Object
    RadzenComponent
    ValidatorBase
    RadzenCompareValidator
    RadzenCustomValidator
    RadzenDataAnnotationValidator
    RadzenEmailValidator
    RadzenLengthValidator
    RadzenNumericRangeValidator
    RadzenRegexValidator
    RadzenRequiredValidator
    Implements
    IDisposable
    IRadzenFormValidator
    Inherited Members
    RadzenComponent.Attributes
    RadzenComponent.Element
    RadzenComponent.MouseEnter
    RadzenComponent.MouseLeave
    RadzenComponent.ContextMenu
    RadzenComponent.Culture
    RadzenComponent.DefaultCulture
    RadzenComponent.OnMouseEnter()
    RadzenComponent.OnMouseLeave()
    RadzenComponent.OnContextMenu(Microsoft.AspNetCore.Components.Web.MouseEventArgs)
    RadzenComponent.Style
    RadzenComponent.Visible
    RadzenComponent.GetCssClass()
    RadzenComponent.GetId()
    RadzenComponent.Debounce(Func<Task>, Int32)
    RadzenComponent.UniqueID
    RadzenComponent.JSRuntime
    RadzenComponent.IsJSRuntimeAvailable
    RadzenComponent.OnInitialized()
    RadzenComponent.Reference
    RadzenComponent.OnAfterRenderAsync(Boolean)
    RadzenComponent.RaiseContextMenu(Microsoft.AspNetCore.Components.Web.MouseEventArgs)
    RadzenComponent.RaiseMouseEnter()
    RadzenComponent.RaiseMouseLeave()
    RadzenComponent.CurrentStyle
    Namespace: Radzen.Blazor
    Assembly: Radzen.Blazor.dll
    Syntax
    public abstract class ValidatorBase : RadzenComponent, IDisposable, IRadzenFormValidator

    Fields

    messages

    Stores the validation messages.

    Declaration
    protected ValidationMessageStore messages
    Field Value
    Type Description
    ValidationMessageStore

    Properties

    Component

    Specifies the component which this validator should validate. Must be set to the Name of an existing component.

    Declaration
    public string Component { get; set; }
    Property Value
    Type Description
    System.String

    EditContext

    Provided by the RadzenTemplateForm<TItem> which contains this validator. Used internally.

    Declaration
    public EditContext EditContext { get; set; }
    Property Value
    Type Description
    EditContext

    The edit context.

    Form

    Gets or sets the form which contains this validator.

    Declaration
    public IRadzenForm Form { get; set; }
    Property Value
    Type Description
    IRadzenForm

    IsValid

    Returns the validity status.

    Declaration
    public bool IsValid { get; protected set; }
    Property Value
    Type Description
    System.Boolean

    true if this validator is valid; otherwise, false.

    Popup

    Determines if the validator is displayed as a popup or not. Set to false by default.

    Declaration
    public bool Popup { get; set; }
    Property Value
    Type Description
    System.Boolean

    Text

    Specifies the message displayed when the validator is invalid.

    Declaration
    public abstract string Text { get; set; }
    Property Value
    Type Description
    System.String

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder builder)
    Parameters
    Type Name Description
    RenderTreeBuilder builder

    Dispose()

    Detaches event handlers and disposes Reference.

    Declaration
    public override void Dispose()
    Overrides
    RadzenComponent.Dispose()

    GetComponentCssClass()

    Gets the component CSS class.

    Declaration
    protected override string GetComponentCssClass()
    Returns
    Type Description
    System.String
    Overrides
    RadzenComponent.GetComponentCssClass()

    SetParametersAsync(ParameterView)

    Called by the Blazor runtime when parameters are set.

    Declaration
    public override async Task SetParametersAsync(ParameterView parameters)
    Parameters
    Type Name Description
    ParameterView parameters

    The parameters.

    Returns
    Type Description
    Task
    Overrides
    RadzenComponent.SetParametersAsync(ParameterView)

    Validate(IRadzenFormComponent)

    Runs validation against the specified component.

    Declaration
    protected abstract bool Validate(IRadzenFormComponent component)
    Parameters
    Type Name Description
    IRadzenFormComponent component

    The component to validate.

    Returns
    Type Description
    System.Boolean

    true if validation is successful, false otherwise.

    Implements

    IDisposable
    IRadzenFormValidator

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

    Learn More

    Download Now
    Download Now
    In This Article
    Back to top Radzen Blazor Components, © 2018-2025 Radzen. Source Code licensed under MIT