Share via


EditContextDataAnnotationsExtensions.AddDataAnnotationsValidation Method

Definition

Caution

Use EnableDataAnnotationsValidation instead.

Adds DataAnnotations validation support to the EditContext.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Components::Forms::EditContext ^ AddDataAnnotationsValidation(Microsoft::AspNetCore::Components::Forms::EditContext ^ editContext);
public static Microsoft.AspNetCore.Components.Forms.EditContext AddDataAnnotationsValidation (this Microsoft.AspNetCore.Components.Forms.EditContext editContext);
[System.Obsolete("Use EnableDataAnnotationsValidation instead.")]
public static Microsoft.AspNetCore.Components.Forms.EditContext AddDataAnnotationsValidation (this Microsoft.AspNetCore.Components.Forms.EditContext editContext);
static member AddDataAnnotationsValidation : Microsoft.AspNetCore.Components.Forms.EditContext -> Microsoft.AspNetCore.Components.Forms.EditContext
[<System.Obsolete("Use EnableDataAnnotationsValidation instead.")>]
static member AddDataAnnotationsValidation : Microsoft.AspNetCore.Components.Forms.EditContext -> Microsoft.AspNetCore.Components.Forms.EditContext
<Extension()>
Public Function AddDataAnnotationsValidation (editContext As EditContext) As EditContext

Parameters

editContext
EditContext

The EditContext.

Returns

Attributes

Applies to