共用方式為


EditContextDataAnnotationsExtensions.EnableDataAnnotationsValidation 方法

定義

多載

EnableDataAnnotationsValidation(EditContext)
已淘汰.

啟用 的 EditContext DataAnnotations 驗證支援。

EnableDataAnnotationsValidation(EditContext, IServiceProvider)

啟用 的 EditContext DataAnnotations 驗證支援。

EnableDataAnnotationsValidation(EditContext)

來源:
EditContextDataAnnotationsExtensions.cs
來源:
EditContextDataAnnotationsExtensions.cs
來源:
EditContextDataAnnotationsExtensions.cs
來源:
EditContextDataAnnotationsExtensions.cs

警告

This API is obsolete and may be removed in future versions. Use the overload that accepts an IServiceProvider instead.

啟用 的 EditContext DataAnnotations 驗證支援。

public static IDisposable EnableDataAnnotationsValidation (this Microsoft.AspNetCore.Components.Forms.EditContext editContext);
[System.Obsolete("This API is obsolete and may be removed in future versions. Use the overload that accepts an IServiceProvider instead.")]
public static IDisposable EnableDataAnnotationsValidation (this Microsoft.AspNetCore.Components.Forms.EditContext editContext);
static member EnableDataAnnotationsValidation : Microsoft.AspNetCore.Components.Forms.EditContext -> IDisposable
[<System.Obsolete("This API is obsolete and may be removed in future versions. Use the overload that accepts an IServiceProvider instead.")>]
static member EnableDataAnnotationsValidation : Microsoft.AspNetCore.Components.Forms.EditContext -> IDisposable
<Extension()>
Public Function EnableDataAnnotationsValidation (editContext As EditContext) As IDisposable

參數

editContext
EditContext

EditContext

傳回

處置的可處置物件將會從 EditContext 移除 DataAnnotations 驗證支援。

屬性

適用於

EnableDataAnnotationsValidation(EditContext, IServiceProvider)

來源:
EditContextDataAnnotationsExtensions.cs
來源:
EditContextDataAnnotationsExtensions.cs
來源:
EditContextDataAnnotationsExtensions.cs

啟用 的 EditContext DataAnnotations 驗證支援。

public static IDisposable EnableDataAnnotationsValidation (this Microsoft.AspNetCore.Components.Forms.EditContext editContext, IServiceProvider serviceProvider);
static member EnableDataAnnotationsValidation : Microsoft.AspNetCore.Components.Forms.EditContext * IServiceProvider -> IDisposable
<Extension()>
Public Function EnableDataAnnotationsValidation (editContext As EditContext, serviceProvider As IServiceProvider) As IDisposable

參數

editContext
EditContext

EditContext

serviceProvider
IServiceProvider

IServiceProvider要用於 的 ValidationContext

傳回

處置的可處置物件將會從 EditContext 移除 DataAnnotations 驗證支援。

適用於