Base class of Radzen validator components.
RadzenComponent.OnAfterRenderAsync
RadzenComponent.RaiseContextMenu
RadzenComponent.RaiseMouseEnter
RadzenComponent.AddContextMenu
RadzenComponent.RaiseMouseLeave
RadzenComponent.OnBecameInvisible
RadzenComponent.DefaultCulture
RadzenComponent.IsJSRuntimeAvailable
ComponentBase.OnInitializedAsync
ComponentBase.OnParametersSet
ComponentBase.OnParametersSetAsync
ComponentBase.StateHasChanged
ComponentBase.ShouldRender
ComponentBase.OnAfterRender
ComponentBase.InvokeAsync
ComponentBase.DispatchExceptionAsync
ComponentBase.RendererInfo
ComponentBase.Assets
ComponentBase.AssignedRenderMode
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
public abstract class ValidatorBase : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender, IRadzenFormValidatorStores the validation messages.
protected Forms.ValidationMessageStore messagesSpecifies the component which this validator should validate. Must be set to the Name of an existing component.
public string Component { get; set; }
| Type | Description |
|---|---|
| string | Specifies the component which this validator should validate. Must be set to the Name of an existing component. |
Provided by the RadzenTemplateForm<T> which contains this validator. Used internally.
public Forms.EditContext EditContext { get; set; }
| Type | Description |
|---|---|
| Forms.EditContext | Provided by the RadzenTemplateForm<T> which contains this validator. Used internally. |
Gets or sets the form which contains this validator.
public IRadzenForm Form { get; set; }
| Type | Description |
|---|---|
| IRadzenForm | Gets or sets the form which contains this validator. |
Returns the validity status.
public bool IsValid { get; set; }
| Type | Description |
|---|---|
| bool | Returns the validity status. |
Determines if the validator is displayed as a popup or not. Set to false by default.
public bool Popup { get; set; }
| Type | Description |
|---|---|
| bool | Determines if the validator is displayed as a popup or not. Set to false by default. |
Specifies the message displayed when the validator is invalid.
public string Text { get; set; }
| Type | Description |
|---|---|
| string | Specifies the message displayed when the validator is invalid. |
protected override void BuildRenderTree(Rendering.RenderTreeBuilder builder)
| Type | Name | Description |
|---|---|---|
| Rendering.RenderTreeBuilder | builder |
protected override string GetComponentCssClass()
| Type | Description |
|---|---|
| string |
public override Task SetParametersAsync(ParameterView parameters)
| Type | Name | Description |
|---|---|---|
| ParameterView | parameters |
| Type | Description |
|---|---|
| Task |
Runs validation against the specified component.
protected abstract bool Validate(IRadzenFormComponent component)
| Type | Name | Description |
|---|---|---|
| IRadzenFormComponent | component | The component to validate. |
| Type | Description |
|---|---|
| bool | true if validation is successful, false otherwise. |